#!/bin/execlineb -P #redirfd -w 1 /dev/console #fdmove -c 2 1 foreground { s6-echo "/etc/rc.shutdown called" } # Write a message to /var/log/syslogd foreground { s6-ipcclient -l0 /dev/log fdmove 1 7 s6-echo "/etc/rc.shutdown: shutdown requested" } # foreground { /sbin/openrc shutdown } # Shut down all services if -n { s6-rc -da change } foreground { s6-echo "`s6-rc -da change` failed" } foreground { sleep 2s }