Skip to content

Commit 7142c96

Browse files
committed
Merge remote-tracking branch 'ArrayBolt3/arraybolt3/misc-fixes'
2 parents 3ff857e + 04ddda9 commit 7142c96

File tree

7 files changed

+14
-44
lines changed

7 files changed

+14
-44
lines changed

etc/privleap/conf.d/usability-misc.conf

Lines changed: 0 additions & 4 deletions
This file was deleted.

usr/bin/apt-get-noninteractive

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ set -e
1414

1515
export POLICYRCD DEBIAN_FRONTEND DEBIAN_PRIORITY DEBCONF_NOWARNINGS APT_LISTCHANGES_FRONTEND NEEDRESTART_MODE
1616

17-
apt-get -o Dpkg::Options::="--force-confask,confnew,confmiss" "$@"
17+
apt-get --yes -o Dpkg::Options::="--force-confask,confnew,confmiss" "$@"

usr/bin/apt-get-update-plus

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
set -e
77

8-
[ -n "$apt_get_update_wrapper" ] || apt_get_update_wrapper="apt-get-noninteractive update"
9-
[ -n "$apt_bin" ] || apt_bin=apt-get-noninteractive
8+
[ -n "$apt_get_update_wrapper" ] || apt_get_update_wrapper="apt-get update"
9+
[ -n "$apt_bin" ] || apt_bin=apt-get
1010

1111
$apt_get_wrapper_pre $apt_get_update_wrapper $apt_get_wrapper_post
1212

usr/bin/gsudoedit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ set -e
2929
# export askpass_title
3030
# export askpass_message
3131

32-
SUDO_ASKPASS=/usr/libexec/usablity-misc/sudo-askpass-gui sudoedit --askpass -- "$@"
32+
SUDO_ASKPASS=/usr/libexec/usability-misc/sudo-askpass-gui sudoedit --askpass -- "$@"

usr/bin/upgrade-nonroot

Lines changed: 10 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,44 +3,18 @@
33
## Copyright (C) 2019 - 2025 ENCRYPTED SUPPORT LLC <adrelanos@whonix.org>
44
## See the file COPYING for copying conditions.
55

6-
set -o errexit
7-
set -o nounset
8-
set -o errtrace
9-
set -o pipefail
6+
set -e
107

11-
if [ "$(id -u)" = "0" ]; then
12-
## Administrative ("root") rights already available.
13-
## No need to use a privilege escalation tool such as 'privleap' or 'sudo'.
14-
exec /usr/bin/apt-get-update-plus dist-upgrade
15-
fi
16-
17-
## This is never reached if running 'exec' above.
18-
19-
# shellcheck source=../../../helper-scripts/usr/libexec/helper-scripts/use_leaprun.sh
20-
source /usr/libexec/helper-scripts/use_leaprun.sh
21-
if [ "${use_leaprun}" = 'yes' ]; then
22-
exec "${leaprun_exe}" upgrade-nonroot-wrapper
23-
fi
24-
25-
## In practice, this should "rarely" be reached.
26-
## Only in case after upgrade, when privleap has not been started yet.
27-
## In a future version, privleap might auto start after installation.
28-
## Then this should "never" be reached.
29-
30-
# shellcheck source=../../../../helper-scripts/usr/libexec/helper-scripts/package_installed_check.bsh
8+
# shellcheck source=../../../helper-scripts/usr/libexec/helper-scripts/package_installed_check.bsh
319
source /usr/libexec/helper-scripts/package_installed_check.bsh
32-
if pkg_installed user-sysmaint-split ; then
33-
if command -v qubesdb-read >/dev/null 2>&1 ; then
34-
1>&2 echo "$0: Cannot run \"apt-get-update-plus dist-upgrade\". Please open a Qubes root console. See: https://www.kicksecure.com/wiki/sysmaint"
35-
else
36-
kernel_cmdline="$(cat /proc/cmdline)"
37-
if ! [[ "${kernel_cmdline}" =~ 'boot-role=sysmaint' ]]; then
38-
1>&2 echo "$0: Cannot run \"apt-get-update-plus dist-upgrade\". Please reboot into \"PERSISTENT mode SYSMAINT\" to do this. See: https://www.kicksecure.com/wiki/sysmaint"
39-
fi
10+
11+
if pkg_installed user-sysmaint-split; then
12+
if [ "$(id -un)" != 'sysmaint' ]; then
13+
1>&2 echo "ERROR: upgrade-nonroot cannot be used by accounts other than"
14+
1>&2 echo "'sysmaint' on this system. For more information, see"
15+
1>&2 echo "https://www.kicksecure.com/wiki/Sysmaint"
16+
exit 1
4017
fi
41-
exit 1
4218
fi
4319

44-
## This is never reached if running 'exec' above.
45-
46-
exec sudo /usr/bin/apt-get-update-plus dist-upgrade
20+
sudo /usr/bin/apt-get-update-plus dist-upgrade
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)