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>
13 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
14 DAEMON=/usr/sbin/sysrqd
17 SECRET=/etc/sysrqd.secret
18 PID=$(pgrep -f /usr/sbin/sysrqd)
20 [[ -x $DAEMON && -f $SECRET ]] || exit 0
22 # Include sysrqd defaults if available
23 [[ -f /etc/conf.d/sysrqd ]] && . /etc/conf.d/sysrqd
27 stat_busy "Starting $DESC: "
28 [[ ! $PID ]] && $DAEMON -- $DAEMON_OPTS
38 stat_busy "Stopping $DESC: "
39 [[ $PID ]] && kill $PID &> /dev/null
50 stat_busy "Restarting $DESC: "
57 printf "Usage: $N {start|stop|restart|force-reload}\n" >&2
64 chmod 0755 /etc/rc.d/sysrqd || return 1
67 - Add sysrqd to /etc/rc.conf to run sysrqd at bootup
69 - Create a password file:
70 echo "mypassword" > /etc/sysrqd.secret
71 chmod 0600 /etc/sysrqd.secret
73 - Optionnaly, create a bind file to bind to a specific IP
74 echo 192.168.2.13 > /etc/sysrqd.bind
85 /bin/rm -f /usr/sbin/sysrqd /etc/rc.d/sysrqd