www.nico.schottelius.org/software/cinit/browse_source/cinit-0.0.4/old/cinit.add.shutdown.reboot.p...

16 lines
314 B
Bash

#!/bin/sh
# Nico Schottelius
# cinit: add shutdown/reboot/poweroff service
set -e
# init variables
. $(dirname $0)/cinit.read-conf
BASEDIR=$DESTDIR/$CINIT_DIR
# create halt, link reboot and poweroff to it
mkdir "$BASEDIR/$C_HALT"
ln -s "$C_HALT" "$BASEDIR/$C_REBOOT"
ln -s "$C_HALT" "$BASEDIR/$C_POWEROFF"