Author: nathan
Date: 2005-03-16 15:39:53 -0700 (Wed, 16 Mar 2005)
New Revision: 4769
Modified:
trunk/bootscripts/CHANGELOG
trunk/bootscripts/lfs/init.d/functions
trunk/bootscripts/lfs/sysconfig/network-devices/ifup
Log:
Reverted change from start_daemon to loadproc
Modified: trunk/bootscripts/CHANGELOG
===================================================================
--- trunk/bootscripts/CHANGELOG 2005-03-16 17:38:21 UTC (rev 4768)
+++ trunk/bootscripts/CHANGELOG 2005-03-16 22:39:53 UTC (rev 4769)
@@ -1,3 +1,11 @@
+n/a - March 16, 2005
+ * Reverted the change from loadproc to start_daemon,
+ Moved compatibility code into one single function.
+
+n/a - March 01, 2005
+ * Moved the "if the interface is up" check from ifup to
+ ipv4-static
+
n/a - February 19, 2005
* Added evaluate_retval to the end of loadproc and killproc.
lsb does not say that killproc should print [ OK ],
Modified: trunk/bootscripts/lfs/init.d/functions
===================================================================
--- trunk/bootscripts/lfs/init.d/functions 2005-03-16 17:38:21 UTC (rev
4768)
+++ trunk/bootscripts/lfs/init.d/functions 2005-03-16 22:39:53 UTC (rev
4769)
@@ -523,15 +523,24 @@
#
# Dependencies: nice
#
-# Todo: This depreciates loadproc
+# Todo: LSB says this should be called start_daemon
+# LSB does not say that it should call evaluate_retval
+# It checks for PIDFILE, which is depreciated.
+# Will be removed after BLFS 6.0
#
#*******************************************************************************
-start_daemon()
+loadproc()
{
local pidfile=""
local forcestart=""
local nicelevel="10"
+# This will ensure compatibility with previous LFS Bootscripts
+ if [ -n "${PIDFILE}" ]
+ then
+ pidfile="${PIDFILE}"
+ fi
+
while true
do
case "${1}" in
@@ -591,21 +600,10 @@
fi
nice -n "${nicelevel}" "[EMAIL PROTECTED]"
+ evaluate_retval # This is "Probably" not LSB compliant, but required to
be compatible with older bootscripts
return 0
}
-# This will ensure compatibility with previous LFS Bootscripts
-loadproc()
-{
- if [ -z "${PIDFILE}" ]
- then
- start_daemon -p "${PIDFILE}" $@
- else
- start_daemon $@
- fi
- evaluate_retval
-}
-
#*******************************************************************************
# Function - killproc [-p pidfile] pathname [signal]
#
@@ -621,9 +619,9 @@
#
# Dependencies: kill
#
-# Todo: This checks for PIDFILE, which is depreciated
-# This calls evaluate_retval, when the LSB does not mention any simular
-# output
+# Todo: LSB does not say that it should call evaluate_retval
+# It checks for PIDFILE, which is depreciated.
+# Will be removed after BLFS 6.0
#
#*******************************************************************************
killproc()
Modified: trunk/bootscripts/lfs/sysconfig/network-devices/ifup
===================================================================
--- trunk/bootscripts/lfs/sysconfig/network-devices/ifup 2005-03-16
17:38:21 UTC (rev 4768)
+++ trunk/bootscripts/lfs/sysconfig/network-devices/ifup 2005-03-16
22:39:53 UTC (rev 4769)
@@ -33,26 +33,9 @@
fi
-# Activate the interface, if not activated
-if ip link show ${1} > /dev/null 2>&1
-then
- link_status=`ip link show ${1} 2> /dev/null`
- if [ -n "${link_status}" ]
- then
- if ! echo "${link_status}" | grep -q UP
- then
- boot_mesg "Bringing up the ${1} interface..."
- ip link set ${1} up
- evaluate_retval
- fi
- fi
-else
- boot_mesg "Interface ${1} doesn't exist." ${WARNING}
- echo_warning
- exit 0
-fi
+boot_mesg "Bringing up the ${1} interface..."
+boot_mesg_flush
-
# Process each configuration file
for file in ${FILES}
do
@@ -65,6 +48,32 @@
(
. ${file}
+ if [ -n "${CHECK_LINK}" -o "${CHECK_LINK}" = "y" -o
"${CHECK_LINK}" = "yes" -o "${CHECK_LINK}" = "1" ]
+ then
+
+ # Activate the interface, if not activated
+ if ip link show ${1} > /dev/null 2>&1
+ then
+ link_status=`ip link show ${1} 2> /dev/null`
+ if [ -n "${link_status}" ]
+ then
+ if ! echo "${link_status}" | grep -q UP
+ then
+ ip link set ${1} up
+ if [ "$?" != "0" ]
+ then
+ boot_mesg "Unable to
activate ${1}." ${FAILURE}
+ echo_failure
+ fi
+ fi
+ fi
+ else
+ boot_mesg "Interface ${1} doesn't exist."
${WARNING}
+ echo_warning
+ exit 0
+ fi
+
+ fi
# This will run the service script, if SERVICE is set
if [ -n "${SERVICE}" -a -x
"${network_devices}/services/${SERVICE}" ]
then
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page