Get dnetc to start automatically in YDL
To get dnetc to run automatically under YDL
assuming /root/dnetc <--- you put the client there
Create a file called /etc/rc.d/init.d/dnetc that looks like this:
#!/bin/sh
if [ -x /root/dnetc ]; then
case "$1" in
*start)
#make sure we're only running one client
/root/dnetc/dnetc -quiet -shutdown
/root/dnetc/dnetc -quiet &
echo "Started distributed.net client"
;;
*stop)
/root/dnetc/dnetc -quiet -shutdown
echo "Stopped distributed.net client"
sleep 2
;;
*)
echo "Syntax: $0 [start|stop]"
exit 1
;;
esac
fi
exit 0
Then run these commands
chmod 755 dnetc
ln -s /etc/rc.d/init.d/dnetc /etc/rc.d/rc0.d/K10dnetc
ln -s /etc/rc.d/init.d/dnetc /etc/rc.d/rc1.d/K10dnetc
ln -s /etc/rc.d/init.d/dnetc /etc/rc.d/rc6.d/K10dnetc
ln -s /etc/rc.d/init.d/dnetc /etc/rc.d/rc2.d/S90dnetc
ln -s /etc/rc.d/init.d/dnetc /etc/rc.d/rc3.d/S90dnetc
ln -s /etc/rc.d/init.d/dnetc /etc/rc.d/rc4.d/S90dnetc
ln -s /etc/rc.d/init.d/dnetc /etc/rc.d/rc5.d/S90dnetc
Init levels 0,1,6 the client gets killed
Init levels 2,3,4,5 the client gets started
the default init run level is 3.
Now you don't need a monitor, keyboard or mouse, just power and nic cable :D