Author: dj
Date: 2008-04-13 00:24:28 -0600 (Sun, 13 Apr 2008)
New Revision: 8525
Added:
trunk/bootscripts/contrib/lsb-v3/etc/
trunk/bootscripts/contrib/lsb-v3/etc/lsb-config
Modified:
trunk/bootscripts/contrib/lsb-v3/Makefile
trunk/bootscripts/contrib/lsb-v3/README
trunk/bootscripts/contrib/lsb-v3/lsb/manage-functions
Log:
added config file, updated README
Modified: trunk/bootscripts/contrib/lsb-v3/Makefile
===================================================================
--- trunk/bootscripts/contrib/lsb-v3/Makefile 2008-04-13 05:20:45 UTC (rev
8524)
+++ trunk/bootscripts/contrib/lsb-v3/Makefile 2008-04-13 06:24:28 UTC (rev
8525)
@@ -18,6 +18,7 @@
install -d -m ${DIRMODE} ${EXTDIR}/init.d
install -d -m ${DIRMODE} ${EXTDIR}/sysconfig
install -d -m ${DIRMODE} ${DESTDIR}/lib/lsb
+ install -d -m ${DIRMODE} ${EXTDIR}/lsb/state
create-service-dir:
install -d -m ${DIRMODE} ${EXTDIR}/sysconfig/network-devices/services
@@ -48,6 +49,7 @@
install -m ${MODE} init.d/udev_retry ${EXTDIR}/init.d/
install -m ${CONFMODE} lsb/init-functions ${DESTDIR}/lib/lsb/
install -m ${CONFMODE} lsb/manage-functions ${DESTDIR}/lib/lsb/
+ install -m ${CONFMODE} etc/lsb-config ${EXTDIR}/lsb/
ln -sf ../init.d/network ${EXTDIR}/rc0.d/K80network
ln -sf ../init.d/sysklogd ${EXTDIR}/rc0.d/K90sysklogd
ln -sf ../init.d/sendsignals ${EXTDIR}/rc0.d/S60sendsignals
@@ -93,7 +95,7 @@
install -m ${MODE}
sysconfig/network-devices/services/ipv4-static
${EXTDIR}/sysconfig/network-devices/services/
install -m ${MODE}
sysconfig/network-devices/services/ipv4-static-route
${EXTDIR}/sysconfig/network-devices/services/
-minimal: create-dirs create-service-dir
+minimal: create-dirs create-service-dir create-boottemp-dir
install -m ${MODE} init.d/checkfs ${EXTDIR}/init.d/
install -m ${MODE} init.d/cleanfs ${EXTDIR}/init.d/
install -m ${CONFMODE} init.d/lfs-functions ${EXTDIR}/init.d/
@@ -109,6 +111,7 @@
install -m ${MODE} init.d/udev ${EXTDIR}/init.d/
install -m ${CONFMODE} lsb/init-functions ${DESTDIR}/lib/lsb/
install -m ${CONFMODE} lsb/manage-functions ${DESTDIR}/lib/lsb/
+ install -m ${CONFMODE} etc/lsb-config ${EXTDIR}/lsb/
ln -sf ../init.d/sendsignals ${EXTDIR}/rc0.d/S60sendsignals
ln -sf ../init.d/mountfs ${EXTDIR}/rc0.d/S70mountfs
ln -sf ../init.d/swap ${EXTDIR}/rc0.d/S80swap
@@ -126,6 +129,6 @@
ln -sf ../init.d/cleanfs ${EXTDIR}/rcsysinit.d/S50cleanfs
if [ ! -f ${EXTDIR}/sysconfig/rc ]; then install -m
${CONFMODE} sysconfig/rc ${EXTDIR}/sysconfig/; fi
-.PHONY: all create-dirs create-service-dir \
+.PHONY: all create-dirs create-service-dir create-boottemp-dir \
install minimal
Modified: trunk/bootscripts/contrib/lsb-v3/README
===================================================================
--- trunk/bootscripts/contrib/lsb-v3/README 2008-04-13 05:20:45 UTC (rev
8524)
+++ trunk/bootscripts/contrib/lsb-v3/README 2008-04-13 06:24:28 UTC (rev
8525)
@@ -1,7 +1,7 @@
LSB-V3 README
The scripts contianed in this directory are a complete rewrite of the
-boot scripts from LFS-6.1 (updated for LFS-SVN about 2007-08-20). As is
+boot scripts from LFS-6.1 (updated for LFS-SVN about 2008-04-13). As is
usually the case with a rewrite, there have been many changes:
LSB Version 3.1 Compliant Scripts - Immediately noticable are the LSB headers
@@ -19,17 +19,18 @@
compliant as it lacks install-initd and remove-initd programs. The current
popular flavor of these programs is written in Python, which, as you should
know, is not installed until BLFS. I began work on a bash implementation,
-with the original intent to use GNU make to procees the generated config
-file. I later decided to use bash directly, but got lost in tab stops and
-have not yet had the time to correct for the change. The gerneral operation
-of the scripts is correct, but parsing the generated temp file is broken ATM
-due to the change from tab to space delimiter. Feel free to have a hack at
-the incomplete scripts I've placed in my home directory on quantum. They
-have been heavily commented, and don't actually do anything as they are not
-yet working as expected. The organize_links script is the one that does all
-of the magic voodoo for a complete reorder. Keep in mind that this script
-would never be called if using only LFS/BLFS supplied scripts.
-http://www.linuxfromscratch.org/~dj/lsb-scripts/
+and have provided the needed functions to parse the LSB headers in the
+manage-functions script (insalled by default into /lib/lsb). Unfortunately,
+I have yet to complete the actual install-initd and remove-initd scripts,
+however, I do have an almost complete install-initd kept locally. I am
+currently working on a separate script to completely rewrite the symlinks
+should LFS default values not prove sufficient when working with scripts in
+the wild. I have not included either here because they are not yet complete
+or thoroughly tested, and due to the development process of lfs-bootscritps,
+would be included in a release tarball. If you would like to assist with the
+development of these scripts, or would even just like to see what I have so
+far, please email me privately. Of course, feel free to write your own if you
+do not like the manage-fucntions script (or bash).
Distribution Independent - this original goal for the LFS scripts has been
stretched even further by providing both a global rc config file that
@@ -44,10 +45,7 @@
single source of the boot configuration per runlevel change. This config
is inherited from rc's environment as opposed to being sourced everytime a
script is run. This results in a negledgable decrease in boot time, but
-it is just better in principle, assuming I didn't break anything. For those
-familiar with the previous versions, the 'stty sane' bit comes to mind, but
-I haven't witnessed any dispaly amomolies, nor do I remember how to reproduce
-the situation that caused us to move that into the functions file before.
+it is just better in principle.
Boot Logging - The previous incarnation of the boot log didn't begin
recording events until the root filesystem was mounted read/write. This has
@@ -74,15 +72,15 @@
LSB Functions - The previous lfs-bootscripts sourced a functions file
located at /etc/rc.d/init.d/functions. This file has been renamed
-<distro>-functions to segregate it from the old. The name is configurable
+$distro-functions to segregate it from the old. The name is configurable
by the rc.site configuration file. Both old and new bootscripts can be
used simultaneously in a SYS-V setup (with proper symlinks in place).
-LSB defined functions are used where possible, but the lfs-functions file
+LSB defined functions are used where possible, but the $distro-functions file
provides, easy to use wraper functions that
start/stop/reload/force-reload/restart programs, evaluate the numerical
LSB return values, and print status messages to the screen. Both LFS
functions and LSB functions are documented directly in the scritps located
-at /etc/init.d/lfs-functions and /lib/lsb/init-functions respectively.
+at /etc/init.d/$distro-functions and /lib/lsb/init-functions respectively.
Pretier - Yeah, I just couldn't handle all the grey text... By default,
successful boot messages are prefixed with a single green astrik character,
Added: trunk/bootscripts/contrib/lsb-v3/etc/lsb-config
===================================================================
--- trunk/bootscripts/contrib/lsb-v3/etc/lsb-config
(rev 0)
+++ trunk/bootscripts/contrib/lsb-v3/etc/lsb-config 2008-04-13 06:24:28 UTC
(rev 8525)
@@ -0,0 +1,8 @@
+# Begin /etc/lsb/lsb-config
+
+rcbase="/etc/init.d"
+statedir="/etc/lsb/state"
+distro="LFS"
+
+# End /etc/lsb/lsb-config
+
Modified: trunk/bootscripts/contrib/lsb-v3/lsb/manage-functions
===================================================================
--- trunk/bootscripts/contrib/lsb-v3/lsb/manage-functions 2008-04-13
05:20:45 UTC (rev 8524)
+++ trunk/bootscripts/contrib/lsb-v3/lsb/manage-functions 2008-04-13
06:24:28 UTC (rev 8525)
@@ -1,14 +1,13 @@
#!/bin/bash
# Begin /lib/lsb/manage-functions
-# /lib/lsb/manage_functions contains the functions used by
+# /lib/lsb/manage-functions contains the functions used by
# /lib/lsb/install_initd and /lib/lsb/remove_initd as well as additional helper
# functions for use in programs that would provide functionality similar to
# the RedHat chkconfig utility, for instance.
-## Define rcbase for now
-## (this will go away when a config file is defined)
-rcbase=/etc/init.d
+# source the confif file
+. /etc/lsb/lsb-config
# Define all arrays at script start to avoid scope issues
# scriptlist is a list of valid scripts used as an index
@@ -26,7 +25,10 @@
# done once #
# Returns no value, but populates the variable ${scriptcount} #
# and the arrays ${scriptlist} and ${fullheaders} for use #
-# with other functions in this script. #
+# with other functions in this script. This function is #
+# called unconditionally at the end of this scrip and is #
+# provided as a function only for the case that it needs to #
+# be called again after other operations. #
###############################################################################
get_headers()
{
@@ -211,4 +213,6 @@
echo "${optprovideslist}" | sed -e "s/^[ \t]*//" -e sed "s/[ \t]*$//"
}
+get_headers
+
# End /lib/lsb/manage-functions
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page