Starte SSH-Server beim Boot.
[people/pmueller/ipfire-2.x.git] / lfs / initscripts
index 23508ab..44ce96a 100644 (file)
 # Makefiles are based on LFSMake, which is                                    #
 # Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com>                        #
 #                                                                             #
-# Modifications by:                                                           #
-# ??-12-2003 Mark Wormgoor < mark@wormgoor.com>                               #
-#          - Modified Makefile for IPCop build                                #
-#                                                                             #
-# $Id: initscripts,v 1.6.2.2 2005/02/05 15:38:15 gespinasse Exp $
-#                                                                             #
 ###############################################################################
 
 ###############################################################################
@@ -32,6 +26,8 @@
 
 include Config
 
+VER = ipfire
+
 THISAPP    = initscripts
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
@@ -54,19 +50,94 @@ md5 :
 
 $(TARGET) :
        @$(PREBUILD)
-       -mkdir -p /etc/rc.d/helper
-       for i in $(DIR_SRC)/src/rc.d/* ; do \
-           if [ -f $$i ]; then \
-               sed "s+CONFIG_ROOT+$(CONFIG_ROOT)+g" $$i > /etc/rc.d/`basename $$i`; \
-           fi; \
-       done
-       for i in $(DIR_SRC)/src/rc.d/helper/* ; do \
-           if [ -f $$i ]; then \
-               sed "s+CONFIG_ROOT+$(CONFIG_ROOT)+g" $$i > /etc/rc.d/helper/`basename $$i`; \
-           fi; \
+
+       # Make directories
+       install -d -m 755 /etc/rc.d/rc0.d
+       install -d -m 755 /etc/rc.d/rc1.d
+       install -d -m 755 /etc/rc.d/rc2.d
+       install -d -m 755 /etc/rc.d/rc3.d
+       install -d -m 755 /etc/rc.d/rc4.d
+       install -d -m 755 /etc/rc.d/rc5.d
+       install -d -m 755 /etc/rc.d/rc6.d
+       install -d -m 755 /etc/rc.d/rcsysinit.d
+       install -d -m 755 /etc/rc.d/init.d
+       install -d -m 755 /etc/sysconfig
+
+       for i in $(DIR_SRC)/src/initscripts/init.d/*; do \
+               install -v -m 754 $$i /etc/rc.d/init.d/; \
        done
-       chmod -R 755 /etc/rc.d
-       chgrp nobody /etc/rc.d/rc.red
-       chmod 4750 /etc/rc.d/rc.red
+       chmod 644 /etc/rc.d/init.d/functions
+
+       ln -sf ../init.d/sysklogd    /etc/rc.d/rc0.d/K90sysklogd
+       ln -sf ../init.d/sendsignals /etc/rc.d/rc0.d/S60sendsignals
+       ln -sf ../init.d/mountfs     /etc/rc.d/rc0.d/S70mountfs
+       ln -sf ../init.d/swap        /etc/rc.d/rc0.d/S80swap
+       ln -sf ../init.d/localnet    /etc/rc.d/rc0.d/S90localnet
+       ln -sf ../init.d/halt        /etc/rc.d/rc0.d/S99halt
+       ln -sf ../init.d/sysklogd    /etc/rc.d/rc1.d/K90sysklogd
+       ln -sf ../init.d/sysklogd    /etc/rc.d/rc2.d/K90sysklogd
+       ln -sf ../init.d/sysklogd    /etc/rc.d/rc3.d/S10sysklogd
+       ln -sf ../init.d/sysklogd    /etc/rc.d/rc4.d/S10sysklogd
+       ln -sf ../init.d/sysklogd    /etc/rc.d/rc5.d/S10sysklogd
+       ln -sf ../init.d/sysklogd    /etc/rc.d/rc6.d/K90sysklogd
+       ln -sf ../init.d/sendsignals /etc/rc.d/rc6.d/S60sendsignals
+       ln -sf ../init.d/mountfs     /etc/rc.d/rc6.d/S70mountfs
+       ln -sf ../init.d/swap        /etc/rc.d/rc6.d/S80swap
+       ln -sf ../init.d/localnet    /etc/rc.d/rc6.d/S90localnet
+       ln -sf ../init.d/reboot      /etc/rc.d/rc6.d/S99reboot
+       ln -sf ../init.d/sshd        /etc/rc.d/rc0.d/K30sshd
+       ln -sf ../init.d/sshd        /etc/rc.d/rc1.d/K30sshd
+       ln -sf ../init.d/sshd        /etc/rc.d/rc2.d/K30sshd
+       ln -sf ../init.d/sshd        /etc/rc.d/rc3.d/S30sshd
+       ln -sf ../init.d/sshd        /etc/rc.d/rc4.d/S30sshd
+       ln -sf ../init.d/sshd        /etc/rc.d/rc5.d/S30sshd
+       ln -sf ../init.d/sshd        /etc/rc.d/rc6.d/K30sshd
+       ln -sf ../init.d/apache      /etc/rc.d/rc0.d/K28apache
+       ln -sf ../init.d/apache      /etc/rc.d/rc1.d/K28apache
+       ln -sf ../init.d/apache      /etc/rc.d/rc2.d/K28apache
+       ln -sf ../init.d/apache      /etc/rc.d/rc3.d/S32apache
+       ln -sf ../init.d/apache      /etc/rc.d/rc4.d/S32apache
+       ln -sf ../init.d/apache      /etc/rc.d/rc5.d/S32apache
+       ln -sf ../init.d/apache      /etc/rc.d/rc6.d/K28apache
+       ln -sf ../init.d/fcron       /etc/rc.d/rc0.d/K08fcron
+       ln -sf ../init.d/fcron       /etc/rc.d/rc1.d/K08fcron
+       ln -sf ../init.d/fcron       /etc/rc.d/rc2.d/S40fcron
+       ln -sf ../init.d/fcron       /etc/rc.d/rc3.d/S40fcron
+       ln -sf ../init.d/fcron       /etc/rc.d/rc4.d/S40fcron
+       ln -sf ../init.d/fcron       /etc/rc.d/rc5.d/S40fcron
+       ln -sf ../init.d/fcron       /etc/rc.d/rc6.d/K08fcron
+       ln -sf ../init.d/mountkernfs /etc/rc.d/rcsysinit.d/S00mountkernfs
+       ln -sf ../init.d/modules     /etc/rc.d/rcsysinit.d/S05modules
+       ln -sf ../init.d/udev        /etc/rc.d/rcsysinit.d/S10udev
+       ln -sf ../init.d/swap        /etc/rc.d/rcsysinit.d/S20swap
+       ln -sf ../init.d/checkfs     /etc/rc.d/rcsysinit.d/S30checkfs
+       ln -sf ../init.d/mountfs     /etc/rc.d/rcsysinit.d/S40mountfs
+       ln -sf ../init.d/udev_retry  /etc/rc.d/rcsysinit.d/S45udev_retry
+       ln -sf ../init.d/cleanfs     /etc/rc.d/rcsysinit.d/S50cleanfs
+       ln -sf ../init.d/setclock    /etc/rc.d/rcsysinit.d/S60setclock
+       ln -sf ../init.d/console     /etc/rc.d/rcsysinit.d/S70console
+       ln -sf ../init.d/localnet    /etc/rc.d/rcsysinit.d/S80localnet
+       ln -sf ../init.d/sysctl      /etc/rc.d/rcsysinit.d/S90sysctl
+
+       install -m 644 $(DIR_SRC)/src/initscripts/sysconfig/createfiles /etc/sysconfig/
+       install -m 644 $(DIR_SRC)/src/initscripts/sysconfig/modules     /etc/sysconfig/
+       install -m 644 $(DIR_SRC)/src/initscripts/sysconfig/rc          /etc/sysconfig/
+       install -m 644 $(DIR_SRC)/src/initscripts/sysconfig/clock       /etc/sysconfig/
+       install -m 644 $(DIR_SRC)/src/initscripts/sysconfig/network     /etc/sysconfig/
+
+#      -mkdir -p /etc/rc.d/helper
+#      for i in $(DIR_SRC)/src/rc.d/* ; do \
+#          if [ -f $$i ]; then \
+#              sed "s+CONFIG_ROOT+$(CONFIG_ROOT)+g" $$i > /etc/rc.d/`basename $$i`; \
+#          fi; \
+#      done
+#      for i in $(DIR_SRC)/src/rc.d/helper/* ; do \
+#          if [ -f $$i ]; then \
+#              sed "s+CONFIG_ROOT+$(CONFIG_ROOT)+g" $$i > /etc/rc.d/helper/`basename $$i`; \
+#          fi; \
+#      done
+#      chmod -R 755 /etc/rc.d
+#      chgrp nobody /etc/rc.d/rc.red
+#      chmod 4750 /etc/rc.d/rc.red
 
        @$(POSTBUILD)