# HG changeset patch # User Pascal Bellard # Date 1208633460 0 # Node ID 73595cae4a672134d29733b0ca19b183641407e3 # Parent 87b81df312aa59db1cf3fc7ae40213f7abf01dcc busybox: dnsd inetd udhcpd startup scripts diff -r 87b81df312aa -r 73595cae4a67 busybox/receipt --- a/busybox/receipt Sat Apr 19 12:12:21 2008 +0000 +++ b/busybox/receipt Sat Apr 19 19:31:00 2008 +0000 @@ -31,12 +31,16 @@ genpkg_rules() { cp -a $src/_install/* $fs - mkdir $fs/etc + mkdir -p $fs/etc/init.d # Busybox config files. cp stuff/busybox.conf $fs/etc chmod 600 $fs/etc/busybox.conf cp stuff/dnsd.conf $fs/etc cp stuff/udhcpd.conf $fs/etc + cp stuff/inetd.conf $fs/etc + cp stuff/dnsd $fs/etc/init.d + cp stuff/udhcpd $fs/etc/init.d + cp stuff/inetd $fs/etc/init.d cd $fs rm linuxrc ln -s bin/busybox init diff -r 87b81df312aa -r 73595cae4a67 busybox/stuff/dnsd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/busybox/stuff/dnsd Sat Apr 19 19:31:00 2008 +0000 @@ -0,0 +1,57 @@ +#!/bin/sh +# /etc/init.d/dnsd: Start, stop and restart DNS deamon on SliTaz, at boot +# time or with the command line. +# +# To start daemon at boot time, just put the right name in the $RUN_DAEMONS +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf. +# +. /etc/init.d/rc.functions +. /etc/daemons.conf + +NAME=Dnsd +DESC="DNS deamon" +DAEMON=/usr/sbin/dnsd +OPTIONS=$DNSD_OPTIONS +PIDFILE=/var/run/dnsd.pid + +case "$1" in + start) + if [ -f $PIDFILE ] ; then + echo "$NAME already running." + exit 1 + fi + echo -n "Starting $DESC: $NAME... " + $DAEMON $OPTIONS + status + ;; + stop) + if [ ! -f $PIDFILE ] ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Stopping $DESC: $NAME... " + kill `cat $PIDFILE` + rm $PIDFILE + status + ;; + restart) + if [ ! -f $PIDFILE ] ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Restarting $DESC: $NAME... " + kill `cat $PIDFILE` + rm $PIDFILE + sleep 2 + $DAEMON $OPTIONS + status + ;; + *) + echo "" + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" + echo "" + exit 1 + ;; +esac + +exit 0 diff -r 87b81df312aa -r 73595cae4a67 busybox/stuff/inetd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/busybox/stuff/inetd Sat Apr 19 19:31:00 2008 +0000 @@ -0,0 +1,55 @@ +#!/bin/sh +# /etc/init.d/inetd: Start, stop and restart Inet deamon on SliTaz, at boot +# time or with the command line. +# +# To start daemon at boot time, just put the right name in the $RUN_DAEMONS +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf. +# +. /etc/init.d/rc.functions +. /etc/daemons.conf + +NAME=Inetd +DESC="inetd deamon" +DAEMON=/usr/sbin/inetd +OPTIONS=$INETD_OPTIONS +PIDFILE=/var/run/inetd.pid + +case "$1" in + start) + if [ -f $PIDFILE ] ; then + echo "$NAME already running." + exit 1 + fi + echo -n "Starting $DESC: $NAME... " + $DAEMON $OPTIONS + status + ;; + stop) + if [ ! -f $PIDFILE ] ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Stopping $DESC: $NAME... " + kill `cat $PIDFILE` + status + ;; + restart) + if [ ! -f $PIDFILE ] ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Restarting $DESC: $NAME... " + kill `cat $PIDFILE` + sleep 2 + $DAEMON $OPTIONS + status + ;; + *) + echo "" + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" + echo "" + exit 1 + ;; +esac + +exit 0 diff -r 87b81df312aa -r 73595cae4a67 busybox/stuff/inetd.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/busybox/stuff/inetd.conf Sat Apr 19 19:31:00 2008 +0000 @@ -0,0 +1,31 @@ +# Internet server configuration database +# +# +# If you want to disable an entry so it isn't touched during +# package updates just comment it out with a single '#' character. +# +# If you make changes to this file, either reboot your machine or +# send the inetd process a HUP signal: +# Do a "ps x" as root and look up the pid of inetd. Then do a +# kill -HUP +# inetd will re-read this file whenever it gets that signal. +# +# +#:INTERNAL: Internal services +# It is generally considered safer to keep these off. +echo stream tcp nowait root internal +echo dgram udp wait root internal +#discard stream tcp nowait root internal +#discard dgram udp wait root internal +daytime stream tcp nowait root internal +daytime dgram udp wait root internal +#chargen stream tcp nowait root internal +#chargen dgram udp wait root internal +time stream tcp nowait root internal +time dgram udp wait root internal + +# These are standard services. +# +tftp dgram udp wait root /usr/bin/tftpd /usr/bin/tftpd -r /boot +#systat stream tcp nowait nobody /bin/ps +#netstat stream tcp nowait root /bin/netstat /bin/netstat -a diff -r 87b81df312aa -r 73595cae4a67 busybox/stuff/udhcpd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/busybox/stuff/udhcpd Sat Apr 19 19:31:00 2008 +0000 @@ -0,0 +1,55 @@ +#!/bin/sh +# /etc/init.d/udhcpd: Start, stop and restart Udhcp deamon on SliTaz, at boot +# time or with the command line. +# +# To start daemon at boot time, just put the right name in the $RUN_DAEMONS +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf. +# +. /etc/init.d/rc.functions +. /etc/daemons.conf + +NAME=Udhcpd +DESC="udhcp deamon" +DAEMON=/usr/sbin/udhcpd +OPTIONS=$UDHCPD_OPTIONS +PIDFILE=/var/run/udhcpd.pid + +case "$1" in + start) + if [ -f $PIDFILE ] ; then + echo "$NAME already running." + exit 1 + fi + echo -n "Starting $DESC: $NAME... " + $DAEMON $OPTIONS + status + ;; + stop) + if [ ! -f $PIDFILE ] ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Stopping $DESC: $NAME... " + kill `cat $PIDFILE` + status + ;; + restart) + if [ ! -f $PIDFILE ] ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Restarting $DESC: $NAME... " + kill `cat $PIDFILE` + sleep 2 + $DAEMON $OPTIONS + status + ;; + *) + echo "" + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" + echo "" + exit 1 + ;; +esac + +exit 0