Rename all INIT scripts to have the numerical prefixes to easily see the start-up...
author"Steven J. Hill" <sjhill@realitydiluted.com>
Wed, 9 May 2007 22:48:41 +0000 (22:48 -0000)
committer"Steven J. Hill" <sjhill@realitydiluted.com>
Wed, 9 May 2007 22:48:41 +0000 (22:48 -0000)
38 files changed:
package/dbus/S97messagebus [new file with mode: 0755]
package/dbus/dbus.mk
package/dbus/init-dbus [deleted file]
package/dhcp/S80dhcp-relay [new file with mode: 0755]
package/dhcp/S80dhcp-server [new file with mode: 0755]
package/dhcp/dhcp.mk
package/dhcp/init-relay [deleted file]
package/dhcp/init-server [deleted file]
package/hal/S98haldaemon [new file with mode: 0755]
package/hal/hal.mk
package/hal/init-hal [deleted file]
package/ltt/S27tracer [new file with mode: 0755]
package/ltt/init-tracer [deleted file]
package/ltt/ltt.mk
package/netplug/S29netplug [new file with mode: 0755]
package/netplug/init-netplug [deleted file]
package/netplug/netplug.mk
package/nfs-utils/S60nfs [new file with mode: 0755]
package/nfs-utils/init-nfs [deleted file]
package/nfs-utils/nfs-utils.mk
package/portmap/S13portmap [new file with mode: 0755]
package/portmap/init-portmap [deleted file]
package/portmap/portmap.mk
package/proftpd/S50proftpd [new file with mode: 0755]
package/proftpd/init-proftpd [deleted file]
package/proftpd/proftpd.mk
package/samba/S91smb [new file with mode: 0755]
package/samba/init-samba [deleted file]
package/samba/samba.mk
package/sysklogd/S25syslog [new file with mode: 0755]
package/sysklogd/init-syslog [deleted file]
package/sysklogd/sysklogd.mk
package/tftpd/S80tftpd-hpa [new file with mode: 0755]
package/tftpd/init-tftpd [deleted file]
package/tftpd/tftpd.mk
package/udev/S10udev [new file with mode: 0755]
package/udev/init-udev [deleted file]
package/udev/udev.mk

diff --git a/package/dbus/S97messagebus b/package/dbus/S97messagebus
new file mode 100755 (executable)
index 0000000..bddb3b9
--- /dev/null
@@ -0,0 +1,76 @@
+#!/bin/sh
+#
+# messagebus:   The D-BUS systemwide message bus
+#
+# chkconfig: 345 97 03
+# description:  This is a daemon which broadcasts notifications of system events \
+#               and other messages. See http://www.freedesktop.org/software/dbus/
+#
+# processname: dbus-daemon
+# pidfile: /var/run/messagebus.pid
+#
+
+# Sanity checks.
+[ -x /usr/bin/dbus-daemon ] || exit 0
+
+# Create needed directories.
+[ -d /var/run/dbus ] || mkdir -p /var/run/dbus
+[ -d /var/lock/subsys ] || mkdir -p /var/lock/subsys
+
+RETVAL=0
+
+start() {
+    echo -n "Starting system message bus: "
+
+    dbus-daemon --system
+    RETVAL=$?
+    echo "done"
+    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dbus-daemon
+}
+
+stop() {
+    echo -n "Stopping system message bus: "
+
+    ## we don't want to kill all the per-user $processname, we want
+    ## to use the pid file *only*; because we use the fake nonexistent 
+    ## program name "$servicename" that should be safe-ish
+    killall dbus-daemon
+    RETVAL=$?
+    echo "done"
+    if [ $RETVAL -eq 0 ]; then
+        rm -f /var/lock/subsys/dbus-daemon
+        rm -f /var/run/messagebus.pid
+    fi
+}
+
+# See how we were called.
+case "$1" in
+    start)
+        start
+        ;;
+    stop)
+        stop
+        ;;
+    status)
+        status $processname
+        RETVAL=$?
+        ;;
+    restart)
+        stop
+        start
+        ;;
+    condrestart)
+        if [ -f /var/lock/subsys/$servicename ]; then
+            stop
+            start
+        fi
+        ;;
+    reload)
+        echo "Message bus can't reload its configuration, you have to restart it"
+        RETVAL=$?
+        ;;
+    *)
+        echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
+        ;;
+esac
+exit $RETVAL
index 47210708f7acbd6bb3dcd03bb60e8aa3a0a18605..289811dda500d9b17837dcb9b3844663b761e7e1 100644 (file)
@@ -65,7 +65,7 @@ $(TARGET_DIR)/$(DBUS_TARGET_BINARY): $(STAGING_DIR)/usr/lib/libdbus-1.so
        rm -f $(TARGET_DIR)/usr/lib/libdbus-1.so
        -$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libdbus-1.so.3.2.0
        $(MAKE) DESTDIR=$(TARGET_DIR) initddir=/etc/init.d -C $(DBUS_DIR)/bus install
-       $(INSTALL) -m 0755 -D package/dbus/init-dbus $(TARGET_DIR)/etc/init.d/S97messagebus
+       $(INSTALL) -m 0755 -D package/dbus/S97messagebus $(TARGET_DIR)/etc/init.d
        rm -f $(TARGET_DIR)/etc/init.d/messagebus
        rm -rf $(TARGET_DIR)/usr/man
        rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share
diff --git a/package/dbus/init-dbus b/package/dbus/init-dbus
deleted file mode 100755 (executable)
index bddb3b9..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/sh
-#
-# messagebus:   The D-BUS systemwide message bus
-#
-# chkconfig: 345 97 03
-# description:  This is a daemon which broadcasts notifications of system events \
-#               and other messages. See http://www.freedesktop.org/software/dbus/
-#
-# processname: dbus-daemon
-# pidfile: /var/run/messagebus.pid
-#
-
-# Sanity checks.
-[ -x /usr/bin/dbus-daemon ] || exit 0
-
-# Create needed directories.
-[ -d /var/run/dbus ] || mkdir -p /var/run/dbus
-[ -d /var/lock/subsys ] || mkdir -p /var/lock/subsys
-
-RETVAL=0
-
-start() {
-    echo -n "Starting system message bus: "
-
-    dbus-daemon --system
-    RETVAL=$?
-    echo "done"
-    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dbus-daemon
-}
-
-stop() {
-    echo -n "Stopping system message bus: "
-
-    ## we don't want to kill all the per-user $processname, we want
-    ## to use the pid file *only*; because we use the fake nonexistent 
-    ## program name "$servicename" that should be safe-ish
-    killall dbus-daemon
-    RETVAL=$?
-    echo "done"
-    if [ $RETVAL -eq 0 ]; then
-        rm -f /var/lock/subsys/dbus-daemon
-        rm -f /var/run/messagebus.pid
-    fi
-}
-
-# See how we were called.
-case "$1" in
-    start)
-        start
-        ;;
-    stop)
-        stop
-        ;;
-    status)
-        status $processname
-        RETVAL=$?
-        ;;
-    restart)
-        stop
-        start
-        ;;
-    condrestart)
-        if [ -f /var/lock/subsys/$servicename ]; then
-            stop
-            start
-        fi
-        ;;
-    reload)
-        echo "Message bus can't reload its configuration, you have to restart it"
-        RETVAL=$?
-        ;;
-    *)
-        echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
-        ;;
-esac
-exit $RETVAL
diff --git a/package/dhcp/S80dhcp-relay b/package/dhcp/S80dhcp-relay
new file mode 100755 (executable)
index 0000000..c870ea7
--- /dev/null
@@ -0,0 +1,53 @@
+#!/bin/sh
+#
+# $Id: dhcp3-relay,v 1.1 2004/04/16 15:41:08 ml Exp $
+#
+
+
+# What servers should the DHCP relay forward requests to?
+# e.g: SERVERS="192.168.0.1"
+SERVERS=""
+
+# On what interfaces should the DHCP relay (dhrelay) serve DHCP requests?
+INTERFACES=""
+
+# Additional options that are passed to the DHCP relay daemon?
+OPTIONS=""
+
+
+
+
+# It is not safe to start if we don't have a default configuration...
+echo "/etc/init.d/dhcp-relay not yet configured! - Aborting..."
+exit 1;
+
+
+
+# Build command line for interfaces (will be passed to dhrelay below.)
+IFCMD=""
+if test "$INTERFACES" != ""; then
+       for I in $INTERFACES; do
+               IFCMD=${IFCMD}"-i "${I}" "
+       done
+fi
+
+DHCRELAYPID=/var/run/dhcrelay.pid
+
+case "$1" in
+       start)
+               start-stop-daemon -S -x /usr/sbin/dhcrelay -- -q $OPTIONS $IFCMD $SERVERS
+               ;;
+       stop)
+               start-stop-daemon -K -x /usr/sbin/dhcrelay
+               ;;
+       restart | force-reload)
+               $0 stop
+               sleep 2
+               $0 start
+               ;;
+       *)
+               echo "Usage: /etc/init.d/dhcp-relay {start|stop|restart|force-reload}"
+               exit 1 
+esac
+
+exit 0
diff --git a/package/dhcp/S80dhcp-server b/package/dhcp/S80dhcp-server
new file mode 100755 (executable)
index 0000000..7c7f893
--- /dev/null
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# $Id: dhcp3-server.init.d,v 1.4 2003/07/13 19:12:41 mdz Exp $
+#
+
+
+
+# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
+#       Separate multiple interfaces with spaces, e.g. "eth0 eth1".
+INTERFACES=""
+
+
+# It is not safe to start if we don't have a default configuration...
+echo "/etc/init.d/dhcp-server not yet configured! - Aborting..."
+exit 1;
+
+
+
+test -f /usr/sbin/dhcpd || exit 0
+
+
+case "$1" in
+       start)
+               echo -n "Starting DHCP server: "
+               test -d /var/lib/dhcp/ || mkdir -p /var/lib/dhcp/
+               test -f /var/lib/dhcp/dhcpd.leases || touch /var/lib/dhcp/dhcpd.leases  
+               start-stop-daemon -S -x /usr/sbin/dhcpd -- -q $INTERFACES
+               echo "."
+               ;;
+       stop)
+               echo -n "Stopping DHCP server: dhcpd3"
+               start-stop-daemon -K -x /usr/sbin/dhcpd
+               echo "."
+               ;;
+       restart | force-reload)
+               $0 stop
+               sleep 2
+               $0 start
+               if [ "$?" != "0" ]; then
+                       exit 1
+               fi
+               ;;
+       *)
+               echo "Usage: /etc/init.d/dhcp-server {start|stop|restart|force-reload}"
+               exit 1 
+esac
+
+exit 0
index 75fd554b23b960a286dce4b34301f04638093d1e..ec219e737f33cfd3812ec9faf477919ceb6187b7 100644 (file)
@@ -43,7 +43,7 @@ $(DHCP_DIR)/$(DHCP_RELAY_BINARY): $(DHCP_DIR)/.configured
 $(TARGET_DIR)/$(DHCP_SERVER_TARGET_BINARY): $(DHCP_DIR)/$(DHCP_RELAY_BINARY)
        (cd $(TARGET_DIR)/var/lib; ln -snf /tmp dhcp)
        $(INSTALL) -m 0755 -D $(DHCP_DIR)/$(DHCP_SERVER_BINARY) $(TARGET_DIR)/$(DHCP_SERVER_TARGET_BINARY)
-       $(INSTALL) -m 0755 -D package/dhcp/init-server $(TARGET_DIR)/etc/init.d/S80dhcp-server
+       $(INSTALL) -m 0755 -D package/dhcp/S80dhcp-server $(TARGET_DIR)/etc/init.d
        $(INSTALL) -m 0644 -D package/dhcp/dhcpd.conf $(TARGET_DIR)/etc/dhcp/dhcpd.conf
        rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
                $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
@@ -51,7 +51,7 @@ $(TARGET_DIR)/$(DHCP_SERVER_TARGET_BINARY): $(DHCP_DIR)/$(DHCP_RELAY_BINARY)
 $(TARGET_DIR)/$(DHCP_RELAY_TARGET_BINARY): $(DHCP_DIR)/$(DHCP_RELAY_BINARY)
        (cd $(TARGET_DIR)/var/lib; ln -snf /tmp dhcp)
        $(INSTALL) -m 0755 -D $(DHCP_DIR)/$(DHCP_RELAY_BINARY) $(TARGET_DIR)/$(DHCP_RELAY_TARGET_BINARY)
-       $(INSTALL) -m 0755 -D package/dhcp/init-relay $(TARGET_DIR)/etc/init.d/S80dhcp-relay
+       $(INSTALL) -m 0755 -D package/dhcp/S80dhcp-relay $(TARGET_DIR)/etc/init.d
        rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
                $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
 
diff --git a/package/dhcp/init-relay b/package/dhcp/init-relay
deleted file mode 100755 (executable)
index c870ea7..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/sh
-#
-# $Id: dhcp3-relay,v 1.1 2004/04/16 15:41:08 ml Exp $
-#
-
-
-# What servers should the DHCP relay forward requests to?
-# e.g: SERVERS="192.168.0.1"
-SERVERS=""
-
-# On what interfaces should the DHCP relay (dhrelay) serve DHCP requests?
-INTERFACES=""
-
-# Additional options that are passed to the DHCP relay daemon?
-OPTIONS=""
-
-
-
-
-# It is not safe to start if we don't have a default configuration...
-echo "/etc/init.d/dhcp-relay not yet configured! - Aborting..."
-exit 1;
-
-
-
-# Build command line for interfaces (will be passed to dhrelay below.)
-IFCMD=""
-if test "$INTERFACES" != ""; then
-       for I in $INTERFACES; do
-               IFCMD=${IFCMD}"-i "${I}" "
-       done
-fi
-
-DHCRELAYPID=/var/run/dhcrelay.pid
-
-case "$1" in
-       start)
-               start-stop-daemon -S -x /usr/sbin/dhcrelay -- -q $OPTIONS $IFCMD $SERVERS
-               ;;
-       stop)
-               start-stop-daemon -K -x /usr/sbin/dhcrelay
-               ;;
-       restart | force-reload)
-               $0 stop
-               sleep 2
-               $0 start
-               ;;
-       *)
-               echo "Usage: /etc/init.d/dhcp-relay {start|stop|restart|force-reload}"
-               exit 1 
-esac
-
-exit 0
diff --git a/package/dhcp/init-server b/package/dhcp/init-server
deleted file mode 100755 (executable)
index 7c7f893..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/sh
-#
-# $Id: dhcp3-server.init.d,v 1.4 2003/07/13 19:12:41 mdz Exp $
-#
-
-
-
-# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
-#       Separate multiple interfaces with spaces, e.g. "eth0 eth1".
-INTERFACES=""
-
-
-# It is not safe to start if we don't have a default configuration...
-echo "/etc/init.d/dhcp-server not yet configured! - Aborting..."
-exit 1;
-
-
-
-test -f /usr/sbin/dhcpd || exit 0
-
-
-case "$1" in
-       start)
-               echo -n "Starting DHCP server: "
-               test -d /var/lib/dhcp/ || mkdir -p /var/lib/dhcp/
-               test -f /var/lib/dhcp/dhcpd.leases || touch /var/lib/dhcp/dhcpd.leases  
-               start-stop-daemon -S -x /usr/sbin/dhcpd -- -q $INTERFACES
-               echo "."
-               ;;
-       stop)
-               echo -n "Stopping DHCP server: dhcpd3"
-               start-stop-daemon -K -x /usr/sbin/dhcpd
-               echo "."
-               ;;
-       restart | force-reload)
-               $0 stop
-               sleep 2
-               $0 start
-               if [ "$?" != "0" ]; then
-                       exit 1
-               fi
-               ;;
-       *)
-               echo "Usage: /etc/init.d/dhcp-server {start|stop|restart|force-reload}"
-               exit 1 
-esac
-
-exit 0
diff --git a/package/hal/S98haldaemon b/package/hal/S98haldaemon
new file mode 100755 (executable)
index 0000000..40ea0f4
--- /dev/null
@@ -0,0 +1,56 @@
+#!/bin/sh
+#
+# haldaemon:   HAL daemon
+#
+# chkconfig: 345 98 02
+# description:  This is a daemon for collecting and maintaing information \
+#               about hardware from several sources. \
+#               See http://www.freedesktop.org/Software/hal
+#
+# processname: hald
+# pidfile: /var/run/haldaemon.pid
+#
+
+# Sanity checks.
+[ -x /usr/sbin/hald ] || exit 0
+
+RETVAL=0
+
+start() {
+    echo -n "Starting HAL daemon: "
+    hald
+    RETVAL=$?
+    echo "done"
+    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/haldaemon
+}
+
+stop() {
+    echo -n "Stopping HAL daemon: "
+
+    killall hald
+    RETVAL=$?
+    echo "done"
+    if [ $RETVAL -eq 0 ]; then
+        rm -f /var/lock/subsys/haldaemon
+        rm -f /var/run/haldaemon.pid
+    fi
+}
+
+# See how we were called.
+case "$1" in
+    start)
+        start
+        ;;
+    stop)
+        stop
+        ;;
+    restart)
+        stop
+       sleep 3
+        start
+        ;;
+    *)
+        echo $"Usage: $0 {start|stop|restart}"
+        ;;
+esac
+exit $RETVAL
index 3d35a4c675bdce337dcc69db7157d74666910060..130d0da465eb7becf197402953158cc51280f238 100644 (file)
@@ -74,7 +74,7 @@ $(TARGET_DIR)/$(HAL_TARGET_BINARY): $(HAL_DIR)/hald/hald
        rm -rf $(TARGET_DIR)/usr/lib/libhal*.la
        rm -rf $(TARGET_DIR)/usr/lib/hal
        rm -rf $(TARGET_DIR)/etc/PolicyKit
-       $(INSTALL) -m 0755 -D package/hal/init-hal $(TARGET_DIR)/etc/init.d/S98haldaemon
+       $(INSTALL) -m 0755 -D package/hal/S98haldaemon $(TARGET_DIR)/etc/init.d
        rm -rf $(TARGET_DIR)/etc/rc.d
        for file in hald-addon-acpi* hald-addon-cpufreq         \
                    hald-addon-keyboard hald-addon-pmu          \
diff --git a/package/hal/init-hal b/package/hal/init-hal
deleted file mode 100755 (executable)
index 40ea0f4..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/sh
-#
-# haldaemon:   HAL daemon
-#
-# chkconfig: 345 98 02
-# description:  This is a daemon for collecting and maintaing information \
-#               about hardware from several sources. \
-#               See http://www.freedesktop.org/Software/hal
-#
-# processname: hald
-# pidfile: /var/run/haldaemon.pid
-#
-
-# Sanity checks.
-[ -x /usr/sbin/hald ] || exit 0
-
-RETVAL=0
-
-start() {
-    echo -n "Starting HAL daemon: "
-    hald
-    RETVAL=$?
-    echo "done"
-    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/haldaemon
-}
-
-stop() {
-    echo -n "Stopping HAL daemon: "
-
-    killall hald
-    RETVAL=$?
-    echo "done"
-    if [ $RETVAL -eq 0 ]; then
-        rm -f /var/lock/subsys/haldaemon
-        rm -f /var/run/haldaemon.pid
-    fi
-}
-
-# See how we were called.
-case "$1" in
-    start)
-        start
-        ;;
-    stop)
-        stop
-        ;;
-    restart)
-        stop
-       sleep 3
-        start
-        ;;
-    *)
-        echo $"Usage: $0 {start|stop|restart}"
-        ;;
-esac
-exit $RETVAL
diff --git a/package/ltt/S27tracer b/package/ltt/S27tracer
new file mode 100755 (executable)
index 0000000..3dee492
--- /dev/null
@@ -0,0 +1,93 @@
+#!/bin/sh
+#
+# Load tracer module and create tracer device node.
+#
+
+MODULE="tracer"
+MAIN_DEVICE="tracer"
+USER_DEVICE="tracerU"
+GROUP="root"
+MODE="664"
+
+start() {
+       if [ -e /dev/${MAIN_DEVICE} -o -e /dev/${USER_DEVICE} ]
+       then
+           # tell the user about what we are doing
+           echo "Deleting old tracer nodes: /dev/tracer and /dev/tracerU"
+
+           # remove stale nodes
+           rm -f /dev/${MAIN_DEVICE}
+           rm -f /dev/${USER_DEVICE}
+       fi
+
+       # look for the major number
+       MAJOR=`/bin/grep " ${MODULE}$" /proc/devices | cut -d" " -f1`
+
+       # does the device exist?
+       if [ ${MAJOR} ]
+       then
+           echo "Found tracer device with major number:" ${MAJOR}
+       else
+           echo "Loading tracer kernel module: "
+           # invoke modprobe
+           /sbin/modprobe ${MODULE}
+           MAJOR=`/bin/grep " ${MODULE}$" /proc/devices | cut -d" " -f1`
+           if [ ${MAJOR} ]
+           then
+               echo "Found tracer device with major number:" ${MAJOR}
+           else
+               echo "Did not find tracer device ... /dev entries not created ..."
+               exit 1
+           fi
+       fi
+
+       # tell the user about what we are doing
+       echo "Creating new tracer nodes: /dev/tracer and /dev/tracerU"
+
+       # create the character special file
+       /bin/mknod /dev/${MAIN_DEVICE} c ${MAJOR} 0
+       /bin/mknod /dev/${USER_DEVICE} c ${MAJOR} 1
+
+       # set permissions and ownership
+       /bin/chgrp ${GROUP} /dev/${MAIN_DEVICE}
+       /bin/chmod ${MODE}  /dev/${MAIN_DEVICE}
+       /bin/chgrp ${GROUP} /dev/${USER_DEVICE}
+       /bin/chmod ${MODE}  /dev/${USER_DEVICE}
+}
+stop() {
+       # tell the user about what we are doing
+       echo "Deleting tracer nodes: /dev/tracer and /dev/tracerU"
+
+       # remove nodes
+       rm -f /dev/${MAIN_DEVICE}
+       rm -f /dev/${USER_DEVICE}
+
+       if lsmod | /bin/grep "^${MODULE} "
+       then
+           echo -n "Removing tracer kernel module: "
+           # invoke modprobe -r
+           /sbin/modprobe -r ${MODULE}
+           echo "OK"
+       fi
+}
+restart() {
+       stop
+       start
+}
+
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  restart|reload)
+       restart
+       ;;
+  *)
+       echo $"Usage: $0 {start|stop|restart}"
+       exit 1
+esac
+
+exit $?
diff --git a/package/ltt/init-tracer b/package/ltt/init-tracer
deleted file mode 100755 (executable)
index 3dee492..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/bin/sh
-#
-# Load tracer module and create tracer device node.
-#
-
-MODULE="tracer"
-MAIN_DEVICE="tracer"
-USER_DEVICE="tracerU"
-GROUP="root"
-MODE="664"
-
-start() {
-       if [ -e /dev/${MAIN_DEVICE} -o -e /dev/${USER_DEVICE} ]
-       then
-           # tell the user about what we are doing
-           echo "Deleting old tracer nodes: /dev/tracer and /dev/tracerU"
-
-           # remove stale nodes
-           rm -f /dev/${MAIN_DEVICE}
-           rm -f /dev/${USER_DEVICE}
-       fi
-
-       # look for the major number
-       MAJOR=`/bin/grep " ${MODULE}$" /proc/devices | cut -d" " -f1`
-
-       # does the device exist?
-       if [ ${MAJOR} ]
-       then
-           echo "Found tracer device with major number:" ${MAJOR}
-       else
-           echo "Loading tracer kernel module: "
-           # invoke modprobe
-           /sbin/modprobe ${MODULE}
-           MAJOR=`/bin/grep " ${MODULE}$" /proc/devices | cut -d" " -f1`
-           if [ ${MAJOR} ]
-           then
-               echo "Found tracer device with major number:" ${MAJOR}
-           else
-               echo "Did not find tracer device ... /dev entries not created ..."
-               exit 1
-           fi
-       fi
-
-       # tell the user about what we are doing
-       echo "Creating new tracer nodes: /dev/tracer and /dev/tracerU"
-
-       # create the character special file
-       /bin/mknod /dev/${MAIN_DEVICE} c ${MAJOR} 0
-       /bin/mknod /dev/${USER_DEVICE} c ${MAJOR} 1
-
-       # set permissions and ownership
-       /bin/chgrp ${GROUP} /dev/${MAIN_DEVICE}
-       /bin/chmod ${MODE}  /dev/${MAIN_DEVICE}
-       /bin/chgrp ${GROUP} /dev/${USER_DEVICE}
-       /bin/chmod ${MODE}  /dev/${USER_DEVICE}
-}
-stop() {
-       # tell the user about what we are doing
-       echo "Deleting tracer nodes: /dev/tracer and /dev/tracerU"
-
-       # remove nodes
-       rm -f /dev/${MAIN_DEVICE}
-       rm -f /dev/${USER_DEVICE}
-
-       if lsmod | /bin/grep "^${MODULE} "
-       then
-           echo -n "Removing tracer kernel module: "
-           # invoke modprobe -r
-           /sbin/modprobe -r ${MODULE}
-           echo "OK"
-       fi
-}
-restart() {
-       stop
-       start
-}
-
-case "$1" in
-  start)
-       start
-       ;;
-  stop)
-       stop
-       ;;
-  restart|reload)
-       restart
-       ;;
-  *)
-       echo $"Usage: $0 {start|stop|restart}"
-       exit 1
-esac
-
-exit $?
index f4a2d0962f766b4179f37abaa9b6cdfba3518902..3626c232d15bc2dcdb2021878b6c8c6581ca06a2 100644 (file)
@@ -98,7 +98,7 @@ $(TARGET_DIR)/usr/bin/tracedaemon: $(LTT_DIR2)/$(LTT_TARGET_BINARY)
        $(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR=$(TARGET_DIR) \
                -C $(LTT_DIR2)/Daemon install
        $(STRIP) $(TARGET_DIR)/usr/bin/tracedaemon > /dev/null 2>&1
-       $(INSTALL) -D -m 0755 package/ltt/init-tracer $(TARGET_DIR)/etc/init.d/S27tracer
+       $(INSTALL) -D -m 0755 package/ltt/S27tracer $(TARGET_DIR)/etc/init.d
 
 ltt-tracedaemon: uclibc $(TARGET_DIR)/usr/bin/tracedaemon
 
diff --git a/package/netplug/S29netplug b/package/netplug/S29netplug
new file mode 100755 (executable)
index 0000000..791e14b
--- /dev/null
@@ -0,0 +1,69 @@
+#!/bin/sh
+#
+# netplugd     This shell script takes care of starting and stopping
+#              the network plug management daemon.
+#
+# chkconfig: - 11 89
+# description: netplugd is a daemon for managing non-static network \
+#              interfaces.
+# processname: netplugd
+# pidfile: /var/run/netplugd.pid
+
+# Copyright 2003 Key Research, Inc.
+
+# Source function library.
+if [ -f /etc/init.d/functions ]; then
+       . /etc/init.d/functions
+elif [ -f /etc/rc.d/init.d/functions ]; then
+       . /etc/rc.d/init.d/functions
+fi
+
+# Source networking configuration.
+if [ -f /etc/sysconfig/network ]; then
+       . /etc/sysconfig/network
+
+       # Check that networking is up.
+       [ ${NETWORKING} = "no" ] && exit 0
+elif [ ! -f /etc/network/interfaces ]; then
+       # No network support
+       exit 0
+fi
+
+[ -x /sbin/netplugd ] || exit 0
+
+if [ -f /etc/sysconfig/netplugd ]; then
+    . /etc/sysconfig/netplugd
+fi
+
+# See how we were called.
+case "$1" in
+  start)
+       # Start daemon.
+       echo -n $"Starting network plug daemon: "
+       start-stop-daemon --start --quiet --pidfile /var/run/netplugd.pid --exec /sbin/netplugd ${NETPLUGDARGS}
+       RETVAL=$?
+       echo
+       [ $RETVAL -eq 0 ] && touch /var/lock/subsys/netplugd
+       ;;
+  stop)
+       # Stop daemon.
+       echo -n $"Shutting down network plug daemon: "
+       start-stop-daemon --stop --name netplugd
+       RETVAL=$?
+       echo
+       [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/netplugd
+       ;;
+  restart|reload)
+       $0 stop
+       $0 start
+       ;;
+  condrestart)
+       [ -f /var/lock/subsys/netplugd ] && $0 restart || :
+       ;;
+  *)
+       echo $"Usage: $0 {start|stop|restart}"
+       RETVAL=1
+       ;;
+esac
+
+exit $RETVAL
diff --git a/package/netplug/init-netplug b/package/netplug/init-netplug
deleted file mode 100755 (executable)
index 791e14b..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/sh
-#
-# netplugd     This shell script takes care of starting and stopping
-#              the network plug management daemon.
-#
-# chkconfig: - 11 89
-# description: netplugd is a daemon for managing non-static network \
-#              interfaces.
-# processname: netplugd
-# pidfile: /var/run/netplugd.pid
-
-# Copyright 2003 Key Research, Inc.
-
-# Source function library.
-if [ -f /etc/init.d/functions ]; then
-       . /etc/init.d/functions
-elif [ -f /etc/rc.d/init.d/functions ]; then
-       . /etc/rc.d/init.d/functions
-fi
-
-# Source networking configuration.
-if [ -f /etc/sysconfig/network ]; then
-       . /etc/sysconfig/network
-
-       # Check that networking is up.
-       [ ${NETWORKING} = "no" ] && exit 0
-elif [ ! -f /etc/network/interfaces ]; then
-       # No network support
-       exit 0
-fi
-
-[ -x /sbin/netplugd ] || exit 0
-
-if [ -f /etc/sysconfig/netplugd ]; then
-    . /etc/sysconfig/netplugd
-fi
-
-# See how we were called.
-case "$1" in
-  start)
-       # Start daemon.
-       echo -n $"Starting network plug daemon: "
-       start-stop-daemon --start --quiet --pidfile /var/run/netplugd.pid --exec /sbin/netplugd ${NETPLUGDARGS}
-       RETVAL=$?
-       echo
-       [ $RETVAL -eq 0 ] && touch /var/lock/subsys/netplugd
-       ;;
-  stop)
-       # Stop daemon.
-       echo -n $"Shutting down network plug daemon: "
-       start-stop-daemon --stop --name netplugd
-       RETVAL=$?
-       echo
-       [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/netplugd
-       ;;
-  restart|reload)
-       $0 stop
-       $0 start
-       ;;
-  condrestart)
-       [ -f /var/lock/subsys/netplugd ] && $0 restart || :
-       ;;
-  *)
-       echo $"Usage: $0 {start|stop|restart}"
-       RETVAL=1
-       ;;
-esac
-
-exit $RETVAL
index 018b03b6369e0dd7d1f570911dd7766500966b8e..bf9b92cf3ffcaf9378527ce4a1c08985950db6f4 100644 (file)
@@ -28,7 +28,7 @@ $(NETPLUG_DIR)/$(NETPLUG_BINARY): $(NETPLUG_DIR)/.unpacked
 $(TARGET_DIR)/$(NETPLUG_TARGET_BINARY): $(NETPLUG_DIR)/$(NETPLUG_BINARY)
        $(INSTALL) -m 644 -D $(NETPLUG_DIR)/etc/netplugd.conf $(TARGET_DIR)/etc/netplug/netplugd.conf
        $(INSTALL) -m 755 -D package/netplug/netplug-script $(TARGET_DIR)/etc/netplug.d/netplug
-       $(INSTALL) -m 755 -D package/netplug/init-netplug $(TARGET_DIR)/etc/init.d/S29netplug
+       $(INSTALL) -m 755 -D package/netplug/S29netplug $(TARGET_DIR)/etc/init.d
        $(INSTALL) -m 755 -D $(NETPLUG_DIR)/$(NETPLUG_BINARY) $(TARGET_DIR)/$(NETPLUG_TARGET_BINARY)
        touch -c $(TARGET_DIR)/$(NETPLUG_TARGET_BINARY)
 
diff --git a/package/nfs-utils/S60nfs b/package/nfs-utils/S60nfs
new file mode 100755 (executable)
index 0000000..49dab70
--- /dev/null
@@ -0,0 +1,89 @@
+#!/bin/sh
+#
+# nfs           This shell script takes care of starting and stopping
+#               the NFS services. Stolen from RedHat FC5.
+
+[ -x /usr/sbin/rpc.statd ] || exit 0
+[ -x /usr/sbin/rpc.nfsd ] || exit 0
+[ -x /usr/sbin/rpc.mountd ] || exit 0
+[ -x /usr/sbin/exportfs ] || exit 0
+
+# Don't fail if /etc/exports doesn't exist; create a bare-bones version and continue.
+[ -r /etc/exports ] || \
+    { touch /etc/exports && chmod u+rw,g+r,o+r /etc/exports ; } || \
+    { echo "/etc/exports does not exist" ; exit 0 ; }
+    
+# The /var/lib/nfs directory is actually on a tmpfs filesystem.
+mkdir -p /var/lib/nfs/sm
+mkdir -p /var/lib/nfs/sm.bak
+touch /var/lib/nfs/etab
+touch /var/lib/nfs/rmtab
+touch /var/lib/nfs/state
+touch /var/lib/nfs/xtab
+
+start() {
+       # Start daemons.
+       echo -n "Starting NFS statd: "
+       rpc.statd
+       touch /var/lock/subsys/nfslock
+       echo "done"
+
+       echo -n "Starting NFS services: "
+       /usr/sbin/exportfs -r
+       rpc.statd
+       echo "done"
+
+       echo -n "Starting NFS daemon: "
+       rpc.nfsd 2
+       echo "done"
+
+       echo -n "Starting NFS mountd: "
+       rpc.mountd
+       echo "done"
+       touch /var/lock/subsys/nfs
+}
+
+stop() {
+       # Stop daemons.
+       echo -n "Shutting down NFS mountd: "
+       killall -q rpc.mountd
+       echo "done"
+
+       echo "Shutting down NFS daemon: "
+       kill -9 `pidof nfsd` 2>/dev/null
+       echo "done"
+
+       echo -n "Shutting down NFS services: "
+       /usr/sbin/exportfs -au
+       rm -f /var/lock/subsys/nfs
+       killall -q rpc.statd
+       echo "done"
+
+       echo -n "Stopping NFS statd: "
+       killall -q rpc.statd
+       echo "done"
+       rm -f /var/lock/subsys/nfslock
+}
+
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  restart)
+       stop
+       start
+       ;;
+  reload)
+       /usr/sbin/exportfs -r
+       touch /var/lock/subsys/nfs
+       ;;
+  *)
+       echo "Usage: nfs {start|stop|reload}"
+       exit 1
+esac
+
+exit 0
diff --git a/package/nfs-utils/init-nfs b/package/nfs-utils/init-nfs
deleted file mode 100755 (executable)
index 49dab70..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/bin/sh
-#
-# nfs           This shell script takes care of starting and stopping
-#               the NFS services. Stolen from RedHat FC5.
-
-[ -x /usr/sbin/rpc.statd ] || exit 0
-[ -x /usr/sbin/rpc.nfsd ] || exit 0
-[ -x /usr/sbin/rpc.mountd ] || exit 0
-[ -x /usr/sbin/exportfs ] || exit 0
-
-# Don't fail if /etc/exports doesn't exist; create a bare-bones version and continue.
-[ -r /etc/exports ] || \
-    { touch /etc/exports && chmod u+rw,g+r,o+r /etc/exports ; } || \
-    { echo "/etc/exports does not exist" ; exit 0 ; }
-    
-# The /var/lib/nfs directory is actually on a tmpfs filesystem.
-mkdir -p /var/lib/nfs/sm
-mkdir -p /var/lib/nfs/sm.bak
-touch /var/lib/nfs/etab
-touch /var/lib/nfs/rmtab
-touch /var/lib/nfs/state
-touch /var/lib/nfs/xtab
-
-start() {
-       # Start daemons.
-       echo -n "Starting NFS statd: "
-       rpc.statd
-       touch /var/lock/subsys/nfslock
-       echo "done"
-
-       echo -n "Starting NFS services: "
-       /usr/sbin/exportfs -r
-       rpc.statd
-       echo "done"
-
-       echo -n "Starting NFS daemon: "
-       rpc.nfsd 2
-       echo "done"
-
-       echo -n "Starting NFS mountd: "
-       rpc.mountd
-       echo "done"
-       touch /var/lock/subsys/nfs
-}
-
-stop() {
-       # Stop daemons.
-       echo -n "Shutting down NFS mountd: "
-       killall -q rpc.mountd
-       echo "done"
-
-       echo "Shutting down NFS daemon: "
-       kill -9 `pidof nfsd` 2>/dev/null
-       echo "done"
-
-       echo -n "Shutting down NFS services: "
-       /usr/sbin/exportfs -au
-       rm -f /var/lock/subsys/nfs
-       killall -q rpc.statd
-       echo "done"
-
-       echo -n "Stopping NFS statd: "
-       killall -q rpc.statd
-       echo "done"
-       rm -f /var/lock/subsys/nfslock
-}
-
-# See how we were called.
-case "$1" in
-  start)
-       start
-       ;;
-  stop)
-       stop
-       ;;
-  restart)
-       stop
-       start
-       ;;
-  reload)
-       /usr/sbin/exportfs -r
-       touch /var/lock/subsys/nfs
-       ;;
-  *)
-       echo "Usage: nfs {start|stop|reload}"
-       exit 1
-esac
-
-exit 0
index 36cc523470260b9a4580a0d41738a2f536a3ff2b..b79a9e3d5f180e794123ed8acadc053a8edae60d 100644 (file)
@@ -64,7 +64,7 @@ $(STAGING_DIR)/.fakeroot.nfs-utils: $(NFS_UTILS_DIR)/$(NFS_UTILS_BINARY)
        echo "$(MAKE) prefix=$(TARGET_DIR)/usr statedir=$(TARGET_DIR)/var/lib/nfs CC=$(TARGET_CC) -C $(NFS_UTILS_DIR) install" > $@
        echo "rm -f $(TARGET_DIR)/usr/bin/event_rpcgen.py $(TARGET_DIR)/usr/sbin/nhfs* $(TARGET_DIR)/usr/sbin/nfsstat $(TARGET_DIR)/usr/sbin/showmount" >> $@
        echo "rm -rf $(TARGET_DIR)/usr/share/man" >> $@
-       echo "$(INSTALL) -m 0755 -D package/nfs-utils/init-nfs $(TARGET_DIR)/etc/init.d/S60nfs" >> $@
+       echo "$(INSTALL) -m 0755 -D package/nfs-utils/S60nfs $(TARGET_DIR)/etc/init.d" >> $@
        echo -n "for file in $(NFS_UTILS_TARGETS_) ; do rm -f $(TARGET_DIR)/" >> $@
        echo -n "\$$" >> $@
        echo "file; done" >> $@
diff --git a/package/portmap/S13portmap b/package/portmap/S13portmap
new file mode 100755 (executable)
index 0000000..573a16a
--- /dev/null
@@ -0,0 +1,44 @@
+#! /bin/sh
+
+[ -f /sbin/portmap ] || exit 0
+
+start() {
+       echo -n "Starting portmap: "
+       portmap
+       mkdir -p /var/lock/subsys
+       touch /var/lock/subsys/portmap
+       echo "done"
+}
+
+
+stop() {
+        echo -n "Stopping portmap: "
+       echo
+        killall portmap
+        rm -rf /var/lock/subsys
+       echo "done"
+}
+
+restart() {
+       stop
+       start
+       rm -f /var/run/portmap.state
+}
+
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  restart|reload)
+       restart
+       ;;
+  *)
+       echo "Usage: $0 {start|stop|reload|restart}"
+       exit 1
+esac
+
+exit $?
diff --git a/package/portmap/init-portmap b/package/portmap/init-portmap
deleted file mode 100755 (executable)
index 573a16a..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#! /bin/sh
-
-[ -f /sbin/portmap ] || exit 0
-
-start() {
-       echo -n "Starting portmap: "
-       portmap
-       mkdir -p /var/lock/subsys
-       touch /var/lock/subsys/portmap
-       echo "done"
-}
-
-
-stop() {
-        echo -n "Stopping portmap: "
-       echo
-        killall portmap
-        rm -rf /var/lock/subsys
-       echo "done"
-}
-
-restart() {
-       stop
-       start
-       rm -f /var/run/portmap.state
-}
-
-# See how we were called.
-case "$1" in
-  start)
-       start
-       ;;
-  stop)
-       stop
-       ;;
-  restart|reload)
-       restart
-       ;;
-  *)
-       echo "Usage: $0 {start|stop|reload|restart}"
-       exit 1
-esac
-
-exit $?
index 29fdc2927cbfbdb5b085c77df4c6da4130ad26d5..6b0ba453a07c14c82af00ad5ce2d383d51a84e52 100644 (file)
@@ -26,7 +26,7 @@ $(PORTMAP_DIR)/$(PORTMAP_BINARY): $(PORTMAP_DIR)/.unpacked
 
 $(TARGET_DIR)/$(PORTMAP_TARGET_BINARY): $(PORTMAP_DIR)/$(PORTMAP_BINARY)
        $(INSTALL) -D $(PORTMAP_DIR)/$(PORTMAP_BINARY) $(TARGET_DIR)/$(PORTMAP_TARGET_BINARY)
-       $(INSTALL) -m 0755 -D package/portmap/init-portmap $(TARGET_DIR)/etc/init.d/S13portmap
+       $(INSTALL) -m 0755 -D package/portmap/S13portmap $(TARGET_DIR)/etc/init.d
 
 portmap: uclibc $(TARGET_DIR)/$(PORTMAP_TARGET_BINARY)
 
diff --git a/package/proftpd/S50proftpd b/package/proftpd/S50proftpd
new file mode 100755 (executable)
index 0000000..550e0a6
--- /dev/null
@@ -0,0 +1,47 @@
+#!/bin/sh 
+
+DAEMON=/usr/sbin/proftpd
+trap "" 1
+trap "" 15
+test -f $DAEMON || exit 0
+[ ! -d /var/run/proftpd ] && mkdir /var/run/proftpd
+[ ! -f /var/log/wtmp ] && touch /var/log/wtmp
+
+start() {
+       echo -n "Starting ProFTPD: "
+       $DAEMON
+       if [ $? != 0 ]; then
+               echo "FAILED"
+               exit 1
+       else
+               echo "done"
+       fi
+}
+
+stop() {
+       echo -n "Stopping ProFTPD: "
+       killall proftpd
+        echo "done"
+}
+
+case "$1" in
+    start)
+       start
+       ;;
+
+    stop)
+       stop
+       ;;
+
+    restart)
+       stop
+       start
+       ;;
+
+    *)
+       echo "Usage: /etc/init.d/S50proftpd {start|stop|restart}"
+       exit 1
+       ;;
+esac
+
+exit 0
diff --git a/package/proftpd/init-proftpd b/package/proftpd/init-proftpd
deleted file mode 100755 (executable)
index 550e0a6..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/sh 
-
-DAEMON=/usr/sbin/proftpd
-trap "" 1
-trap "" 15
-test -f $DAEMON || exit 0
-[ ! -d /var/run/proftpd ] && mkdir /var/run/proftpd
-[ ! -f /var/log/wtmp ] && touch /var/log/wtmp
-
-start() {
-       echo -n "Starting ProFTPD: "
-       $DAEMON
-       if [ $? != 0 ]; then
-               echo "FAILED"
-               exit 1
-       else
-               echo "done"
-       fi
-}
-
-stop() {
-       echo -n "Stopping ProFTPD: "
-       killall proftpd
-        echo "done"
-}
-
-case "$1" in
-    start)
-       start
-       ;;
-
-    stop)
-       stop
-       ;;
-
-    restart)
-       stop
-       start
-       ;;
-
-    *)
-       echo "Usage: /etc/init.d/S50proftpd {start|stop|restart}"
-       exit 1
-       ;;
-esac
-
-exit 0
index d2e7fada7d844df2a990fdcf2e149b2127d6e585..231f4535a2d17ac19709e25f40ce7731cd0ab5c6 100644 (file)
@@ -56,7 +56,7 @@ $(TARGET_DIR)/$(PROFTPD_TARGET_BINARY): $(PROFTPD_DIR)/$(PROFTPD_BINARY)
        @if [ ! -f $(TARGET_DIR)/etc/proftpd.conf ] ; then \
                $(INSTALL) -m 0644 -D $(PROFTPD_DIR)/sample-configurations/basic.conf $(TARGET_DIR)/etc/proftpd.conf; \
        fi;
-       $(INSTALL) -m 0755 -D package/proftpd/init-proftpd $(TARGET_DIR)/etc/init.d/S50proftpd
+       $(INSTALL) -m 0755 -D package/proftpd/S50proftpd $(TARGET_DIR)/etc/init.d
 
 proftpd: uclibc $(TARGET_DIR)/$(PROFTPD_TARGET_BINARY)
 
diff --git a/package/samba/S91smb b/package/samba/S91smb
new file mode 100755 (executable)
index 0000000..859b540
--- /dev/null
@@ -0,0 +1,79 @@
+#!/bin/sh
+#
+# Stolen from RedHat FC5.
+#
+
+# Check that smb.conf exists.
+[ -f /etc/samba/smb.conf ] || exit 0
+
+# Make directories.
+mkdir -p /var/cache/samba
+mkdir -p /var/log/samba
+
+RETVAL=0
+
+start() {
+       echo -n "Starting SMB services: "
+       smbd -D
+       RETVAL=$?
+       echo "done"
+
+       echo -n "Starting NMB services: "
+       nmbd -D
+       RETVAL2=$?
+       echo "done"
+
+       [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && touch /var/lock/subsys/smb || \
+          RETVAL=1
+       return $RETVAL
+}      
+
+stop() {
+       echo -n "Shutting down SMB services: "
+       kill -9 `pidof smbd`
+       RETVAL=$?
+       rm -f /var/run/smbd.pid
+       echo "done"
+
+       echo -n "Shutting down NMB services: "
+       kill -9 `pidof nmbd`
+       RETVAL2=$?
+       rm -f /var/run/nmbd.pid
+
+       [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && rm -f /var/lock/subsys/smb
+       echo "done"
+       return $RETVAL
+}      
+
+restart() {
+       stop
+       start
+}      
+
+reload() {
+        echo -n "Reloading smb.conf file: "
+       kill -HUP `pidof smbd`
+       RETVAL=$?
+       echo "done"
+       return $RETVAL
+}      
+
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  restart)
+       restart
+       ;;
+  reload)
+       reload
+       ;;
+  *)
+       echo "Usage: $0 {start|stop|restart|reload}"
+       exit 1
+esac
+
+exit $?
diff --git a/package/samba/init-samba b/package/samba/init-samba
deleted file mode 100755 (executable)
index 859b540..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/bin/sh
-#
-# Stolen from RedHat FC5.
-#
-
-# Check that smb.conf exists.
-[ -f /etc/samba/smb.conf ] || exit 0
-
-# Make directories.
-mkdir -p /var/cache/samba
-mkdir -p /var/log/samba
-
-RETVAL=0
-
-start() {
-       echo -n "Starting SMB services: "
-       smbd -D
-       RETVAL=$?
-       echo "done"
-
-       echo -n "Starting NMB services: "
-       nmbd -D
-       RETVAL2=$?
-       echo "done"
-
-       [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && touch /var/lock/subsys/smb || \
-          RETVAL=1
-       return $RETVAL
-}      
-
-stop() {
-       echo -n "Shutting down SMB services: "
-       kill -9 `pidof smbd`
-       RETVAL=$?
-       rm -f /var/run/smbd.pid
-       echo "done"
-
-       echo -n "Shutting down NMB services: "
-       kill -9 `pidof nmbd`
-       RETVAL2=$?
-       rm -f /var/run/nmbd.pid
-
-       [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && rm -f /var/lock/subsys/smb
-       echo "done"
-       return $RETVAL
-}      
-
-restart() {
-       stop
-       start
-}      
-
-reload() {
-        echo -n "Reloading smb.conf file: "
-       kill -HUP `pidof smbd`
-       RETVAL=$?
-       echo "done"
-       return $RETVAL
-}      
-
-case "$1" in
-  start)
-       start
-       ;;
-  stop)
-       stop
-       ;;
-  restart)
-       restart
-       ;;
-  reload)
-       reload
-       ;;
-  *)
-       echo "Usage: $0 {start|stop|restart|reload}"
-       exit 1
-esac
-
-exit $?
index af8bfcd89eaff413c8c249aba7769287bb6d6c4f..dd177c063b8c264957b37d26e77b7814e0abe209 100644 (file)
@@ -92,7 +92,7 @@ $(TARGET_DIR)/$(SAMBA_TARGET_BINARY): $(SAMBA_DIR)/$(SAMBA_BINARY)
        for file in $(SAMBA_TARGETS_) ; do \
                rm -f $(TARGET_DIR)/$$file; \
        done
-       $(INSTALL) -m 0755 -D package/samba/init-samba $(TARGET_DIR)/etc/init.d/S91smb
+       $(INSTALL) -m 0755 -D package/samba/S91smb $(TARGET_DIR)/etc/init.d
        @if [ ! -f $(TARGET_DIR)/etc/samba/smb.conf ] ; then \
                $(INSTALL) -m 0755 -D package/samba/simple.conf $(TARGET_DIR)/etc/samba/smb.conf; \
        fi;
diff --git a/package/sysklogd/S25syslog b/package/sysklogd/S25syslog
new file mode 100755 (executable)
index 0000000..07683ed
--- /dev/null
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# Starts syslog.
+#
+
+
+
+umask 077
+
+start() {
+       echo -n "Starting syslogd: "
+       start-stop-daemon --start --quiet --pidfile /var/run/syslog.pid --exec /sbin/syslogd -- -m 0
+       echo "OK"
+
+       echo -n "Starting klogd: "
+       start-stop-daemon --start --quiet --pidfile /var/run/klogd.pid --exec /sbin/klogd
+       echo "OK"
+}
+stop() {
+       echo -n "Stopping klogd: "
+       start-stop-daemon --stop --name klogd
+       echo "OK"
+
+       echo -n "Stopping syslogd: "
+       start-stop-daemon --stop --name syslogd
+       echo "OK"
+}
+restart() {
+       stop
+       start
+}
+
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  restart|reload)
+       restart
+       ;;
+  *)
+       echo $"Usage: $0 {start|stop|restart}"
+       exit 1
+esac
+
+exit $?
diff --git a/package/sysklogd/init-syslog b/package/sysklogd/init-syslog
deleted file mode 100755 (executable)
index 07683ed..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/sh
-#
-# Starts syslog.
-#
-
-
-
-umask 077
-
-start() {
-       echo -n "Starting syslogd: "
-       start-stop-daemon --start --quiet --pidfile /var/run/syslog.pid --exec /sbin/syslogd -- -m 0
-       echo "OK"
-
-       echo -n "Starting klogd: "
-       start-stop-daemon --start --quiet --pidfile /var/run/klogd.pid --exec /sbin/klogd
-       echo "OK"
-}
-stop() {
-       echo -n "Stopping klogd: "
-       start-stop-daemon --stop --name klogd
-       echo "OK"
-
-       echo -n "Stopping syslogd: "
-       start-stop-daemon --stop --name syslogd
-       echo "OK"
-}
-restart() {
-       stop
-       start
-}
-
-case "$1" in
-  start)
-       start
-       ;;
-  stop)
-       stop
-       ;;
-  restart|reload)
-       restart
-       ;;
-  *)
-       echo $"Usage: $0 {start|stop|restart}"
-       exit 1
-esac
-
-exit $?
index 84f966c655201ad44e7a04ee7ab6f6d15aa3ebb9..1836fa0d4ebc614753499a3d6ef71bab8187eb73 100644 (file)
@@ -32,7 +32,7 @@ $(SYSKLOGD_DIR)/$(SYSKLOGD_BINARY): $(SYSKLOGD_DIR)/.unpacked
 $(TARGET_DIR)/$(SYSKLOGD_TARGET_BINARY): $(SYSKLOGD_DIR)/$(SYSKLOGD_BINARY)
        $(INSTALL) -m 0755 -D $(SYSKLOGD_DIR)/$(SYSKLOGD_SYSLOGD_BINARY) $(TARGET_DIR)/$(SYSKLOGD_SYSLOGD_TARGET_BINARY)
        $(INSTALL) -m 0755 -D $(SYSKLOGD_DIR)/$(SYSKLOGD_KLOGD_BINARY) $(TARGET_DIR)/$(SYSKLOGD_KLOGD_TARGET_BINARY)
-       $(INSTALL) -m 0755 -D package/sysklogd/init-syslog $(TARGET_DIR)/etc/init.d/S25syslog
+       $(INSTALL) -m 0755 -D package/sysklogd/S25syslog $(TARGET_DIR)/etc/init.d
        $(INSTALL) -m 0644 -D package/sysklogd/syslog.conf $(TARGET_DIR)/etc/syslog.conf
 
 sysklogd: uclibc $(TARGET_DIR)/$(SYSKLOGD_TARGET_BINARY)
diff --git a/package/tftpd/S80tftpd-hpa b/package/tftpd/S80tftpd-hpa
new file mode 100755 (executable)
index 0000000..41c28d1
--- /dev/null
@@ -0,0 +1,81 @@
+#! /bin/sh
+
+OPTIONS="-c -l -s /var/lib/tftpboot"
+
+set -e
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DESC="HPA's tftpd"
+NAME=in.tftpd
+DAEMON=/usr/sbin/$NAME
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/S80tftpd-hpa
+
+#
+#      Function that starts the daemon/service.
+#
+d_start() {
+       mkdir -p /var/lib/tftpboot
+       chmod 1777 /var/lib/tftpboot
+       $DAEMON $OPTIONS
+}
+
+#
+#      Function that stops the daemon/service.
+#
+d_stop() {
+       killall -q $NAME
+}
+
+#
+#      Function that sends a SIGHUP to the daemon/service.
+#
+d_reload() {
+       d_start
+       d_stop
+}
+
+case "$1" in
+  start)
+       echo -n "Starting $DESC: "
+       d_start
+       echo "done"
+       ;;
+  stop)
+       echo -n "Stopping $DESC: "
+       d_stop
+       echo "done"
+       ;;
+  #reload)
+       #
+       #       If the daemon can reload its configuration without
+       #       restarting (for example, when it is sent a SIGHUP),
+       #       then implement that here.
+       #
+       #       If the daemon responds to changes in its config file
+       #       directly anyway, make this an "exit 0".
+       #
+       # echo -n "Reloading $DESC configuration..."
+       # d_reload
+       # echo "done."
+  #;;
+  restart|force-reload)
+       #
+       #       If the "reload" option is implemented, move the "force-reload"
+       #       option to the "reload" entry above. If not, "force-reload" is
+       #       just the same as "restart".
+       #
+       echo -n "Restarting $DESC: "
+       d_stop
+       sleep 1
+       d_start
+       echo "done"
+       ;;
+  *)
+       # echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+       echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+       exit 1
+       ;;
+esac
+
+exit 0
diff --git a/package/tftpd/init-tftpd b/package/tftpd/init-tftpd
deleted file mode 100755 (executable)
index 41c28d1..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-#! /bin/sh
-
-OPTIONS="-c -l -s /var/lib/tftpboot"
-
-set -e
-
-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-DESC="HPA's tftpd"
-NAME=in.tftpd
-DAEMON=/usr/sbin/$NAME
-PIDFILE=/var/run/$NAME.pid
-SCRIPTNAME=/etc/init.d/S80tftpd-hpa
-
-#
-#      Function that starts the daemon/service.
-#
-d_start() {
-       mkdir -p /var/lib/tftpboot
-       chmod 1777 /var/lib/tftpboot
-       $DAEMON $OPTIONS
-}
-
-#
-#      Function that stops the daemon/service.
-#
-d_stop() {
-       killall -q $NAME
-}
-
-#
-#      Function that sends a SIGHUP to the daemon/service.
-#
-d_reload() {
-       d_start
-       d_stop
-}
-
-case "$1" in
-  start)
-       echo -n "Starting $DESC: "
-       d_start
-       echo "done"
-       ;;
-  stop)
-       echo -n "Stopping $DESC: "
-       d_stop
-       echo "done"
-       ;;
-  #reload)
-       #
-       #       If the daemon can reload its configuration without
-       #       restarting (for example, when it is sent a SIGHUP),
-       #       then implement that here.
-       #
-       #       If the daemon responds to changes in its config file
-       #       directly anyway, make this an "exit 0".
-       #
-       # echo -n "Reloading $DESC configuration..."
-       # d_reload
-       # echo "done."
-  #;;
-  restart|force-reload)
-       #
-       #       If the "reload" option is implemented, move the "force-reload"
-       #       option to the "reload" entry above. If not, "force-reload" is
-       #       just the same as "restart".
-       #
-       echo -n "Restarting $DESC: "
-       d_stop
-       sleep 1
-       d_start
-       echo "done"
-       ;;
-  *)
-       # echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
-       echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
-       exit 1
-       ;;
-esac
-
-exit 0
index 69d15d910a3493522e850aa1179ca9c31ad5c2bd..8a9b6c59003f921d2d72b833baee0b6986dbfa8c 100644 (file)
@@ -59,7 +59,7 @@ $(TARGET_DIR)/$(TFTP_HPA_TARGET_BINARY): $(TFTP_HPA_DIR)/$(TFTP_HPA_BINARY)
            rm -f $(TARGET_DIR)/$(TFTP_HPA_TARGET_BINARY); \
            cp -a $(TFTP_HPA_DIR)/$(TFTP_HPA_BINARY) $(TARGET_DIR)/$(TFTP_HPA_TARGET_BINARY); fi ;
        @if [ ! -f $(TARGET_DIR)/etc/init.d/S80tftpd-hpa ] ; then \
-               $(INSTALL) -m 0755 -D package/tftpd/init-tftpd $(TARGET_DIR)/etc/init.d/S80tftpd-hpa; \
+               $(INSTALL) -m 0755 -D package/tftpd/S80tftpd-hpa $(TARGET_DIR)/etc/init.d \
        fi;
 
 tftpd: uclibc $(TARGET_DIR)/$(TFTP_HPA_TARGET_BINARY)
diff --git a/package/udev/S10udev b/package/udev/S10udev
new file mode 100755 (executable)
index 0000000..220fbce
--- /dev/null
@@ -0,0 +1,81 @@
+#!/bin/sh
+#
+# udev This is a minimal non-LSB version of a UDEV startup script.  It
+#      was derived by stripping down the udev-058 LSB version for use
+#      with buildroot on embedded hardware using Linux 2.6.12+ kernels.
+#
+#      You may need to customize this for your system's resource limits
+#      (including startup time!) and administration.  For example, if
+#      your early userspace has a custom initramfs or initrd you might
+#      need /dev much earlier; or without hotpluggable busses (like USB,
+#      PCMCIA, MMC/SD, and so on) your /dev might be static after boot.
+#
+#      This script assumes your system boots right into the eventual root
+#      filesystem, and that init runs this udev script before any programs
+#      needing more device nodes than the bare-bones set -- /dev/console,
+#      /dev/zero, /dev/null -- that's needed to boot and run this script.
+#
+
+# old kernels don't use udev
+case $(uname -r) in
+    2.6*|2.7*) ;;
+    *)         exit 0;;
+esac
+
+# Check for missing binaries
+UDEV_BIN=/sbin/udevd
+test -x $UDEV_BIN || exit 5
+UDEVSTART_BIN=/sbin/udevstart
+test -x $UDEVSTART_BIN || exit 5
+
+# Check for config file and read it
+UDEV_CONFIG=/etc/udev/udev.conf
+test -r $UDEV_CONFIG || exit 6
+. $UDEV_CONFIG
+
+# Directory where sysfs is mounted
+SYSFS_DIR=/sys
+
+case "$1" in
+    start)
+        # mount sysfs if it's not yet mounted
+        if [ ! -d $SYSFS_DIR ]; then
+           echo "${0}: SYSFS_DIR \"$SYSFS_DIR\" not found"
+           exit 1
+        fi
+        grep -q "^sysfs $SYSFS_DIR" /proc/mounts ||
+       mount -t sysfs /sys /sys ||
+       exit 1
+
+        # mount $udev_root as ramfs if it's not yet mounted
+        # we know 2.6 kernels always support ramfs
+        if [ ! -d $udev_root ]; then
+           echo "${0}: udev_root \"$udev_root\" not found"
+           exit 1
+        fi
+        grep -q "^udev $udev_root" /proc/mounts ||
+       mount -t ramfs udev $udev_root ||
+       exit 1
+
+        mkdir $udev_root/pts $udev_root/shm
+
+        # populate /dev (normally)
+        echo -n "Populating $udev_root using udev: "
+        echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
+        $UDEV_BIN -d || (echo "FAIL" && exit 1)
+       $UDEVSTART_BIN || (echo "FAIL" && exit 1)
+        echo "done"
+        ;;
+    stop)
+        # Stop execution of events
+        udevcontrol stop_exec_queue
+        killall udevd
+        ;;
+    *)
+        echo "Usage: $0 {start|stop}"
+        exit 1
+        ;;
+esac
+
+
+exit 0
diff --git a/package/udev/init-udev b/package/udev/init-udev
deleted file mode 100755 (executable)
index 220fbce..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/bin/sh
-#
-# udev This is a minimal non-LSB version of a UDEV startup script.  It
-#      was derived by stripping down the udev-058 LSB version for use
-#      with buildroot on embedded hardware using Linux 2.6.12+ kernels.
-#
-#      You may need to customize this for your system's resource limits
-#      (including startup time!) and administration.  For example, if
-#      your early userspace has a custom initramfs or initrd you might
-#      need /dev much earlier; or without hotpluggable busses (like USB,
-#      PCMCIA, MMC/SD, and so on) your /dev might be static after boot.
-#
-#      This script assumes your system boots right into the eventual root
-#      filesystem, and that init runs this udev script before any programs
-#      needing more device nodes than the bare-bones set -- /dev/console,
-#      /dev/zero, /dev/null -- that's needed to boot and run this script.
-#
-
-# old kernels don't use udev
-case $(uname -r) in
-    2.6*|2.7*) ;;
-    *)         exit 0;;
-esac
-
-# Check for missing binaries
-UDEV_BIN=/sbin/udevd
-test -x $UDEV_BIN || exit 5
-UDEVSTART_BIN=/sbin/udevstart
-test -x $UDEVSTART_BIN || exit 5
-
-# Check for config file and read it
-UDEV_CONFIG=/etc/udev/udev.conf
-test -r $UDEV_CONFIG || exit 6
-. $UDEV_CONFIG
-
-# Directory where sysfs is mounted
-SYSFS_DIR=/sys
-
-case "$1" in
-    start)
-        # mount sysfs if it's not yet mounted
-        if [ ! -d $SYSFS_DIR ]; then
-           echo "${0}: SYSFS_DIR \"$SYSFS_DIR\" not found"
-           exit 1
-        fi
-        grep -q "^sysfs $SYSFS_DIR" /proc/mounts ||
-       mount -t sysfs /sys /sys ||
-       exit 1
-
-        # mount $udev_root as ramfs if it's not yet mounted
-        # we know 2.6 kernels always support ramfs
-        if [ ! -d $udev_root ]; then
-           echo "${0}: udev_root \"$udev_root\" not found"
-           exit 1
-        fi
-        grep -q "^udev $udev_root" /proc/mounts ||
-       mount -t ramfs udev $udev_root ||
-       exit 1
-
-        mkdir $udev_root/pts $udev_root/shm
-
-        # populate /dev (normally)
-        echo -n "Populating $udev_root using udev: "
-        echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
-        $UDEV_BIN -d || (echo "FAIL" && exit 1)
-       $UDEVSTART_BIN || (echo "FAIL" && exit 1)
-        echo "done"
-        ;;
-    stop)
-        # Stop execution of events
-        udevcontrol stop_exec_queue
-        killall udevd
-        ;;
-    *)
-        echo "Usage: $0 {start|stop}"
-        exit 1
-        ;;
-esac
-
-
-exit 0
index d33d6b40180c1423e7f4f9ff4ada1f8eda967120..52b99efeace285c41cfb37dfeed55fd7253483f9 100644 (file)
@@ -45,7 +45,7 @@ $(TARGET_DIR)/$(UDEV_TARGET_BINARY): $(UDEV_DIR)/$(UDEV_BINARY)
                LDFLAGS="-warn-common" \
                USE_LOG=false USE_SELINUX=false \
                udevdir=$(UDEV_ROOT) -C $(UDEV_DIR) install
-       $(INSTALL) -m 0755 -D package/udev/init-udev $(TARGET_DIR)/etc/init.d/S10udev
+       $(INSTALL) -m 0755 -D package/udev/S10udev $(TARGET_DIR)/etc/init.d
        rm -rf $(TARGET_DIR)/usr/share/man
 ifneq ($(strip $(BR2_PACKAGE_UDEV_UTILS)),y)
        rm -f $(TARGET_DIR)/usr/sbin/udevmonitor