|
root / base / usr / src / zyginit / services / cron / start.sh
start.sh Bash 19 lines 672 B
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#!/bin/zsh
# cron — start the cron daemon, cleaning up its stale FIFO first.
#
# /usr/sbin/cron creates /etc/cron.d/FIFO at startup and refuses with
# "cannot start cron; FIFO exists" if the file is already there. The
# canonical SMF svc-cron method removes this exact path before starting
# cron — we mirror that. (Earlier we removed /var/run/cron_fifo which
# is wrong: /var/run is tmpfs so it'd be empty anyway, and that's not
# where cron actually puts the FIFO.)

set -e
set -u

/bin/rm -f /etc/cron.d/FIFO

# exec replaces this shell with cron — supervisor sees cron as the
# direct child, so contract events and stop signals work cleanly.
exec /usr/sbin/cron