launch unattended.sh after cleanup

This commit is contained in:
macmpi 2022-07-24 23:15:11 +02:00
parent 134360420b
commit 089996a528
2 changed files with 6 additions and 7 deletions

Binary file not shown.

View File

@ -97,13 +97,6 @@ cat <<-EOF >> /etc/conf.d/sshd
rc-service sshd start
if [ -f "${ovlpath}/unattended.sh" ]; then
install -m755 "${ovlpath}/unattended.sh" /tmp/unattended.sh
/tmp/unattended.sh >/dev/console 2>&1 &
logger -st ${0##*/} "/tmp/unattended.sh script launched in the background with PID $!"
fi
## Prep for final post-cleanup
cat <<-EOF > /tmp/.trash/post-cleanup
#!/bin/sh
@ -115,6 +108,12 @@ cat <<-EOF > /tmp/.trash/post-cleanup
rc-update del local default
rm /etc/local.d/headless.start
if [ -f "${ovlpath}/unattended.sh" ]; then
install -m755 "${ovlpath}/unattended.sh" /tmp/unattended.sh
/tmp/unattended.sh >/dev/console 2>&1 &
logger -st ${0##*/} "/tmp/unattended.sh script launched in the background with PID \$!"
fi
logger -st ${0##*/} "Done !!"
EOF