installer: route install through system and user phases
This commit is contained in:
@@ -1,3 +1,2 @@
|
||||
run_logged $OMARCHY_INSTALL/post-install/pacman.sh
|
||||
source $OMARCHY_INSTALL/post-install/allow-reboot.sh
|
||||
source $OMARCHY_INSTALL/post-install/system.sh
|
||||
source $OMARCHY_INSTALL/post-install/finished.sh
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# Allow passwordless reboot for the installer - removed in first-run
|
||||
sudo tee /etc/sudoers.d/99-omarchy-installer-reboot >/dev/null <<EOF
|
||||
$USER ALL=(ALL) NOPASSWD: /usr/bin/reboot
|
||||
# Allow passwordless reboot for the online installer - removed in first-run
|
||||
install_user="${OMARCHY_INSTALL_USER:-${USER:-}}"
|
||||
[[ -n $install_user ]] || exit 0
|
||||
|
||||
mkdir -p /etc/sudoers.d
|
||||
cat > /etc/sudoers.d/99-omarchy-installer-reboot <<EOF
|
||||
Cmnd_Alias INSTALLER_REBOOT_CLEANUP = /usr/bin/rm -f /etc/sudoers.d/99-omarchy-installer-reboot, /bin/rm -f /etc/sudoers.d/99-omarchy-installer-reboot
|
||||
$install_user ALL=(ALL) NOPASSWD: /usr/bin/reboot
|
||||
$install_user ALL=(ALL) NOPASSWD: INSTALLER_REBOOT_CLEANUP
|
||||
EOF
|
||||
sudo chmod 440 /etc/sudoers.d/99-omarchy-installer-reboot
|
||||
chmod 440 /etc/sudoers.d/99-omarchy-installer-reboot
|
||||
|
||||
Reference in New Issue
Block a user