Update firstboot-setup.sh
This commit is contained in:
@@ -5,42 +5,10 @@ DIALOG=dialog
|
|||||||
HEIGHT=20
|
HEIGHT=20
|
||||||
WIDTH=74
|
WIDTH=74
|
||||||
LOG="/var/log/firstboot-setup.log"
|
LOG="/var/log/firstboot-setup.log"
|
||||||
WIZARD_DONE="$HOME/.config/cosmic/firstboot.done"
|
|
||||||
|
|
||||||
if [[ -z "${TERM:-}" ]]; then
|
if [[ -z "${TERM:-}" ]]; then
|
||||||
exec cosmic-terminal -- /usr/libexec/cosmic/session.d/firstboot-setup.sh
|
exec cosmic-terminal -- /usr/libexec/firstboot-setup.sh
|
||||||
fi
|
|
||||||
|
|
||||||
# ----------------------------
|
|
||||||
# Detect live environment
|
|
||||||
# ----------------------------
|
|
||||||
if grep -q 'boot=live' /proc/cmdline; then
|
|
||||||
LIVE_MODE=yes
|
|
||||||
else
|
|
||||||
LIVE_MODE=no
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------
|
|
||||||
# Run only once
|
|
||||||
# ----------------------------
|
|
||||||
if [[ "$LIVE_MODE" == no ]] && [[ -f "$WIZARD_DONE" ]]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$LIVE_MODE" == yes ]]; then
|
|
||||||
$DIALOG --title "COSMIC Live‑Umgebung" --msgbox \
|
|
||||||
"Dies ist eine Live‑Vorschau des COSMIC‑Desktops.
|
|
||||||
|
|
||||||
• Änderungen werden nicht gespeichert
|
|
||||||
• Anwendungen werden hier nicht installiert
|
|
||||||
|
|
||||||
Nach der Installation startet ein
|
|
||||||
Setup‑Assistent, der bei der Auswahl
|
|
||||||
von Anwendungen und optionalen Tools
|
|
||||||
wie Homebrew hilft." \
|
|
||||||
$HEIGHT $WIDTH
|
|
||||||
exit 0
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@@ -60,8 +28,8 @@ wirklich abbrechen?" \
|
|||||||
$HEIGHT $WIDTH
|
$HEIGHT $WIDTH
|
||||||
|
|
||||||
if [[ $? -eq 0 ]]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
mkdir -p "$(dirname "$WIZARD_DONE")"
|
rm -f /etc/myos/firstboot
|
||||||
touch "$WIZARD_DONE"
|
systemctl --user disable firstboot-setup.service
|
||||||
clear
|
clear
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
@@ -325,8 +293,8 @@ $HEIGHT $WIDTH 0
|
|||||||
# ----------------------------
|
# ----------------------------
|
||||||
# Mark wizard as done
|
# Mark wizard as done
|
||||||
# ----------------------------
|
# ----------------------------
|
||||||
mkdir -p "$(dirname "$WIZARD_DONE")"
|
rm -f /etc/myos/firstboot
|
||||||
touch "$WIZARD_DONE"
|
systemctl --user disable firstboot-setup.service
|
||||||
|
|
||||||
$DIALOG --title "Fertig" --msgbox \
|
$DIALOG --title "Fertig" --msgbox \
|
||||||
"Die Einrichtung ist abgeschlossen.
|
"Die Einrichtung ist abgeschlossen.
|
||||||
|
|||||||
Reference in New Issue
Block a user