aboutsummaryrefslogtreecommitdiffstats
path: root/lsb-bootscripts
diff options
context:
space:
mode:
authorDJ Lucas <dj@linuxfromscratch.org>2011-05-23 03:41:56 +0000
committerDJ Lucas <dj@linuxfromscratch.org>2011-05-23 03:41:56 +0000
commit5393dbc1b82fd39c18f110da9f02e1ae6ad922cf (patch)
tree31f871d02d460473945329e4c0b95ab6e135cb12 /lsb-bootscripts
parent283fea13fabb7b37b12fcab26025e35ebb4a77ed (diff)
Removed inittab, defaulted to /etc/rc.d.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@9550 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'lsb-bootscripts')
-rw-r--r--lsb-bootscripts/ChangeLog7
-rw-r--r--lsb-bootscripts/Makefile22
-rw-r--r--lsb-bootscripts/etc/default/rc2
-rw-r--r--lsb-bootscripts/etc/inittab26
4 files changed, 18 insertions, 39 deletions
diff --git a/lsb-bootscripts/ChangeLog b/lsb-bootscripts/ChangeLog
index f6c4ca720..fa0c83d5e 100644
--- a/lsb-bootscripts/ChangeLog
+++ b/lsb-bootscripts/ChangeLog
@@ -1,3 +1,10 @@
+2011-05-23 DJ Lucas <dj@linuxfromscratch.org>
+ * Makefile, etc/default/rc: The value of ETCDIR is used to set the RC_BASE at
+ install time. Changed default ETCDIR to /etc/rc.d and added /etc/init.d
+ symlink if ETCDIR is not /etc.
+ * Makefile, etc/inittab: Removed the installation of /etc/inittab as this is
+ done in the book.
+
2011-05-21 DJ Lucas <dj@linuxfromscratch.org>
* lib/lsb/init-functions: Merged the contents of etc/init.d/lfs-functions and
standardized comment headers.
diff --git a/lsb-bootscripts/Makefile b/lsb-bootscripts/Makefile
index 341d61967..23a375ebb 100644
--- a/lsb-bootscripts/Makefile
+++ b/lsb-bootscripts/Makefile
@@ -1,4 +1,4 @@
-ETCDIR=/etc
+ETCDIR=/etc/rc.d
EXTDIR=${DESTDIR}${ETCDIR}
MODE=754
DIRMODE=755
@@ -17,11 +17,12 @@ create-dirs:
install -d -m ${DIRMODE} ${EXTDIR}/rc6.d
install -d -m ${DIRMODE} ${EXTDIR}/rcS.d
install -d -m ${DIRMODE} ${EXTDIR}/init.d
- install -d -m ${DIRMODE} ${EXTDIR}/default
- install -d -m ${DIRMODE} ${EXTDIR}/network
+ install -d -m ${DIRMODE} ${DESTDIR}/etc/default
+ install -d -m ${DIRMODE} ${DESTDIR}/etc/network
install -d -m ${DIRMODE} ${DESTDIR}/sbin
install -d -m ${DIRMODE} ${DESTDIR}/lib/lsb
install -d -m ${DIRMODE} ${DESTDIR}/lib/network-services
+ if [ ${ETCDIR} != /etc ]; then ln -s ${DESTDIR}${ETCDIR}/init.d ${DESTDIR}/etc/init.d; fi
install: create-dirs
install -m ${MODE} etc/init.d/checkfs ${EXTDIR}/init.d/
@@ -44,12 +45,10 @@ install: create-dirs
install -m ${MODE} etc/init.d/udev ${EXTDIR}/init.d/
install -m ${MODE} etc/init.d/udev_retry ${EXTDIR}/init.d/
install -m ${CONFMODE} lib/lsb/init-functions ${DESTDIR}/lib/lsb/
- if [ ! -f ${EXTDIR}/default/createfiles ]; then install -m ${CONFMODE} etc/default/createfiles ${EXTDIR}/default/; fi
- if [ ! -f ${EXTDIR}/default/modules ]; then install -m ${CONFMODE} etc/default/modules ${EXTDIR}/default/; fi
- if [ ! -f ${EXTDIR}/default/rc ]; then install -m ${CONFMODE} etc/default/rc ${EXTDIR}/default/; fi
- if [ ! -f ${EXTDIR}/default/rc.site ]; then install -m ${CONFMODE} etc/default/rc.site ${EXTDIR}/default/; fi
- if [ -f ${EXTDIR}/inittab ]; then install -m ${CONFMODE} ${EXTDIR}/inittab ${EXTDIR}/inittab.bak; fi
- install -m ${CONFMODE} etc/inittab ${EXTDIR}/
+ if [ ! -f ${DESTDIR}/etc/default/createfiles ]; then install -m ${CONFMODE} etc/default/createfiles ${DESTDIR}/etc/default/; fi
+ if [ ! -f ${DESTDIR}/etc/default/modules ]; then install -m ${CONFMODE} etc/default/modules ${DESTDIR}/etc/default/; fi
+ if [ ! -f ${DESTDIR}/etc/default/rc ]; then install -m ${CONFMODE} etc/default/rc ${DESTDIR}/etc/default/; fi
+ if [ ! -f ${DESTDIR}/etc/default/rc.site ]; then install -m ${CONFMODE} etc/default/rc.site ${DESTDIR}/etc/default/; fi
install -m ${MODE} sbin/ifup ${DESTDIR}/sbin/
install -m ${MODE} sbin/ifdown ${DESTDIR}/sbin/
install -m ${MODE} lib/network-services/ipv4-static ${DESTDIR}/lib/network-services/
@@ -70,6 +69,7 @@ install: create-dirs
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/sysctl
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/udev
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/udev_retry
+ sed 's@ETCDIR@${ETCDIR}@' -i ${DESTDIR}/etc/default/rc
minimal: create-dirs
install -m ${MODE} etc/init.d/checkfs ${EXTDIR}/init.d/
@@ -85,9 +85,7 @@ minimal: create-dirs
install -m ${MODE} etc/init.d/swap ${EXTDIR}/init.d/
install -m ${MODE} etc/init.d/udev ${EXTDIR}/init.d/
install -m ${CONFMODE} lib/lsb/init-functions ${DESTDIR}/lib/lsb/
- if [ ! -f ${EXTDIR}/default/rc ]; then install -m ${CONFMODE} default/rc ${EXTDIR}/default/; fi
- if [ -f ${EXTDIR}/inittab ]; then install -m ${CONFMODE} ${EXTDIR}/inittab ${EXTDIR}/inittab.bak; fi
- install -m ${CONFMODE} etc/inittab ${EXTDIR}/
+ if [ ! -f ${DESTDIR}/etc/default/rc ]; then install -m ${CONFMODE} default/rc ${DESTDIR}/etc/default/; fi
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/checkfs
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/cleanfs
/usr/lib/lsb/install_initd ${EXTDIR}/init.d/halt
diff --git a/lsb-bootscripts/etc/default/rc b/lsb-bootscripts/etc/default/rc
index c530f6535..4b756c54f 100644
--- a/lsb-bootscripts/etc/default/rc
+++ b/lsb-bootscripts/etc/default/rc
@@ -10,7 +10,7 @@
. /etc/default/rc.site
# Set base directory information
-RC_BASE="/etc"
+RC_BASE="ETCDIR"
# Location of network device scripts and config files
NETWORK_DEVICES="/etc/network"
diff --git a/lsb-bootscripts/etc/inittab b/lsb-bootscripts/etc/inittab
deleted file mode 100644
index c718c0584..000000000
--- a/lsb-bootscripts/etc/inittab
+++ /dev/null
@@ -1,26 +0,0 @@
-# Begin /etc/inittab
-
-id:3:initdefault:
-
-si::sysinit:/etc/init.d/rc S
-
-l0:0:wait:/etc/init.d/rc 0
-l1:S1:wait:/etc/init.d/rc 1
-l2:2:wait:/etc/init.d/rc 2
-l3:3:wait:/etc/init.d/rc 3
-l4:4:wait:/etc/init.d/rc 4
-l5:5:wait:/etc/init.d/rc 5
-l6:6:wait:/etc/init.d/rc 6
-
-ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
-
-su:S016:once:/sbin/sulogin
-
-1:2345:respawn:/sbin/agetty tty1 9600
-2:2345:respawn:/sbin/agetty tty2 9600
-3:2345:respawn:/sbin/agetty tty3 9600
-4:2345:respawn:/sbin/agetty tty4 9600
-5:2345:respawn:/sbin/agetty tty5 9600
-6:2345:respawn:/sbin/agetty tty6 9600
-
-# End /etc/inittab