mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 11:30:37 +02:00
only run autorun script once
This commit is contained in:
parent
a95bc771e0
commit
19aa637c0c
1 changed files with 3 additions and 2 deletions
|
@ -111,7 +111,7 @@ _run_update_installer() {
|
||||||
|
|
||||||
_run_autorun() {
|
_run_autorun() {
|
||||||
# check on cmdline, don't run on local image, only run autorun once!
|
# check on cmdline, don't run on local image, only run autorun once!
|
||||||
if rg -q 'autorun=' /proc/cmdline && [[ ! -e "${_LOCAL_DB}" && ! -e /.autorun ]]; then
|
if rg -q 'autorun=' /proc/cmdline && [[ ! -e "${_LOCAL_DB}" ]]; then
|
||||||
: > /.autorun
|
: > /.autorun
|
||||||
_REMOTE_AUTORUN="$(rg -o 'autorun=(.*)' -r '$1' /proc/cmdline | sd ' .*' '')"
|
_REMOTE_AUTORUN="$(rg -o 'autorun=(.*)' -r '$1' /proc/cmdline | sd ' .*' '')"
|
||||||
echo "Trying 30 seconds to download:"
|
echo "Trying 30 seconds to download:"
|
||||||
|
@ -138,6 +138,7 @@ _run_autorun() {
|
||||||
_pacman_keyring
|
_pacman_keyring
|
||||||
chmod 755 /etc/archboot/run/autorun.sh
|
chmod 755 /etc/archboot/run/autorun.sh
|
||||||
/etc/archboot/run/./autorun.sh
|
/etc/archboot/run/./autorun.sh
|
||||||
|
echo "Finished autorun.sh."
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,7 +158,7 @@ if [[ "${_TTY}" = "tty1" ]] ; then
|
||||||
# initialize pacman keyring
|
# initialize pacman keyring
|
||||||
[[ -e /etc/systemd/system/pacman-init.service ]] && systemctl start pacman-init
|
[[ -e /etc/systemd/system/pacman-init.service ]] && systemctl start pacman-init
|
||||||
fi
|
fi
|
||||||
_run_autorun
|
! [[ -e /.autorun ]] && _run_autorun
|
||||||
fi
|
fi
|
||||||
# start bottom on VC6
|
# start bottom on VC6
|
||||||
while [[ "${_TTY}" = "tty6" ]] ; do
|
while [[ "${_TTY}" = "tty6" ]] ; do
|
||||||
|
|
Loading…
Reference in a new issue