AlastairPorter is trying to write some RedHat init.d scripts for the MetaNet.
Edit the page to copy the script, because i can't be bothered to indent it
Etud:
#
#
# #
. /etc/rc.d/init.d/functions
ETUDCONF=/usr/local/etc/etud.conf DAEMON=/usr/local/sbin/Etud
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin NAME=Etud DESC="EtherneT over Udp Daemon" IP=/bin/ip
if ! -f ${ETUDCONF}?; then
echo Could not find etud configuration file exit
fi
IFNAME=wan0 CTRLFILE=/var/run/Etud.ctrl PIDFILE=/var/run/Etud.pid
while read parameter value do
if "$parameter" == "pidfile"?; then
PIDFILE=`echo "$value" | tr -d '"'`
elif "$parameter" == "ctrlfile"?; then
CTRLFILE=`echo "$value" | tr -d '"'`
elif "$parameter" == "ifname"?; then
IFNAME=`echo "$value" | tr -d '"'`
fi
done < $ETUDCONF
test -x $DAEMON || exit 0 ARGS="-f $ETUDCONF -p $PIDFILE"
set -e
case "$1" in start) echo -n "Starting Etud"
-e $CTRLFILE? && {
echo "" echo -n "Control file exists, checking to see if Etud lives? "
-e ${PIDFILE}? || {
echo "" echo "No pidfile present, exiting" exit 1;
}
- check that the pid in the pid file
x`cat ${PIDFILE}` == x`pidof ${NAME}`? && {
echo "... yes, aborting" exit 1;
} || {
echo "... no, removing" \rm ${CTRLFILE}
}
}
daemon $DAEMON $ARGS ifdown ${IFNAME} ifup ${IFNAME} echo ;;
stop)
echo -n "Stopping Etud " ifdown ${IFNAME}
restart|force-reload)
echo -n "Restarting $NAME" ifdown ${IFNAME}
)
echo "Usage: $0 {start|stop|restart|force-reload}" >&2 ;;
esac
One page links to RedHatMetaNetScripts:
lib/main.php:944: Notice: PageInfo: Cannot find action page