diff --git a/bin/omarchy-cmd-first-run b/bin/omarchy-cmd-first-run index ab0e7e62..1031185f 100755 --- a/bin/omarchy-cmd-first-run +++ b/bin/omarchy-cmd-first-run @@ -8,6 +8,7 @@ if [[ -f "$FIRST_RUN_MODE" ]]; then rm -f "$FIRST_RUN_MODE" bash "$OMARCHY_PATH/install/first-run/battery-monitor.sh" + bash "$OMARCHY_PATH/install/first-run/cleanup-reboot-sudoers.sh" bash "$OMARCHY_PATH/install/first-run/firewall.sh" bash "$OMARCHY_PATH/install/first-run/dns-resolver.sh" bash "$OMARCHY_PATH/install/first-run/gnome-theme.sh" diff --git a/install/first-run/cleanup-reboot-sudoers.sh b/install/first-run/cleanup-reboot-sudoers.sh new file mode 100644 index 00000000..ccc9966b --- /dev/null +++ b/install/first-run/cleanup-reboot-sudoers.sh @@ -0,0 +1,3 @@ +if sudo test -f /etc/sudoers.d/99-omarchy-installer-reboot; then + sudo rm -f /etc/sudoers.d/99-omarchy-installer-reboot +fi diff --git a/install/post-install/all.sh b/install/post-install/all.sh index 4242b627..bb5c0839 100644 --- a/install/post-install/all.sh +++ b/install/post-install/all.sh @@ -1,2 +1,3 @@ run_logged $OMARCHY_INSTALL/post-install/pacman.sh +source $OMARCHY_INSTALL/post-install/allow-reboot.sh source $OMARCHY_INSTALL/post-install/finished.sh diff --git a/install/post-install/allow-reboot.sh b/install/post-install/allow-reboot.sh new file mode 100644 index 00000000..a5e28d14 --- /dev/null +++ b/install/post-install/allow-reboot.sh @@ -0,0 +1,5 @@ +# Allow passwordless reboot for the installer - removed in first-run +sudo tee /etc/sudoers.d/99-omarchy-installer-reboot >/dev/null </dev/null; then - systemctl reboot --no-wall 2>/dev/null + if [[ -n "${OMARCHY_CHROOT_INSTALL:-}" ]]; then + touch /var/tmp/omarchy-install-completed + exit 0 else - reboot 2>/dev/null + sudo reboot 2>/dev/null fi fi