File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 88# shellcheck source=../../../helper-scripts/usr/libexec/helper-scripts/package_installed_check.bsh
99source /usr/libexec/helper-scripts/package_installed_check.bsh
1010
11+ if [ " $( id -un) " = ' root' ]; then
12+ # # Avoid using 'sudo' if already using account 'root'. Reasons:
13+ # # - Using 'sudo' is unnecessary in this case.
14+ # # - Would work in case of a user-sysmaint-split or sudo bug.
15+ exec /usr/bin/apt-get-update-plus dist-upgrade
16+ fi
17+
18+ # # This is never reached if using 'exec' above.
19+
1120if pkg_installed user-sysmaint-split; then
1221 # # Example use cases for using account 'root' with user-sysmaint-split installed:
1322 # # - root login
1423 # # - Qubes root console.
15- if [ " $( id -un) " != ' sysmaint' ] && [ " $( id -un ) " != ' root ' ] ; then
24+ if [ " $( id -un) " != ' sysmaint' ]; then
1625 1>&2 echo " ERROR: upgrade-nonroot cannot be used by accounts other than"
1726 1>&2 echo " 'sysmaint' (or 'root') on this system. For more information, see"
1827 1>&2 echo " https://www.kicksecure.com/wiki/Sysmaint"
1928 exit 1
2029 fi
2130fi
2231
23- sudo /usr/bin/apt-get-update-plus dist-upgrade
32+ exec sudo /usr/bin/apt-get-update-plus dist-upgrade
You can’t perform that action at this time.
0 commit comments