2 cat<<'EOF' > /etc/rc.d/sysrqd || return 1
6 # writen by sputnick for archlinux/AUR <gilles DOT quenot AT gmail DOT com>
7 # adapted from debian sysrqd init script - Julien Danjou <acid@debian.org>
14 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
15 DAEMON=/usr/sbin/sysrqd
18 SECRET=/etc/sysrqd.secret
19 PID=$(pgrep -f /usr/sbin/sysrqd)
21 [[ -x $DAEMON && -f $SECRET ]] || exit 0
23 # Include sysrqd defaults if available
24 [[ -f /etc/conf.d/sysrqd ]] && . /etc/conf.d/sysrqd
28 stat_busy "Starting $DESC: "
29 [[ ! $PID ]] && $DAEMON -- $DAEMON_OPTS
39 stat_busy "Stopping $DESC: "
40 [[ $PID ]] && kill $PID &> /dev/null
51 stat_busy "Restarting $DESC: "
58 printf "Usage: $N {start|stop|restart|force-reload}\n" >&2
65 chmod 0755 /etc/rc.d/sysrqd || return 1
68 - Add sysrqd to /etc/rc.conf to run sysrqd at bootup
70 - Create a password file:
71 echo "mypassword" > /etc/sysrqd.secret
72 chmod 0600 /etc/sysrqd.secret
74 - Optionnaly, create a bind file to bind to a specific IP
75 echo 192.168.2.13 > /etc/sysrqd.bind
86 /bin/rm -f /usr/sbin/sysrqd /etc/rc.d/sysrqd