initng/trunk/system: cleanfs.i consolefont.i hostname.i initial.i modules.i mountfs.i mountroot.i
glen
cvs at pld-linux.org
Sun Feb 26 13:59:02 CET 2006
Author: glen
Date: Sun Feb 26 13:59:00 2006
New Revision: 7025
Modified:
initng/trunk/system/cleanfs.i
initng/trunk/system/consolefont.i
initng/trunk/system/hostname.i
initng/trunk/system/initial.i
initng/trunk/system/modules.i
initng/trunk/system/mountfs.i
initng/trunk/system/mountroot.i
Log:
- must read sysconfig/system before init.d/functions otherwise autodetected env vars get reset
Modified: initng/trunk/system/cleanfs.i
==============================================================================
--- initng/trunk/system/cleanfs.i (original)
+++ initng/trunk/system/cleanfs.i Sun Feb 26 13:59:00 2006
@@ -2,19 +2,15 @@
need = system/mountfs;
script start = {
- # Set the path
- export PATH=/bin:/sbin:/usr/bin:/usr/sbin
-
- # Read functions
- . /etc/rc.d/init.d/functions
-
- # Read system config data
- if [ -r /etc/sysconfig/system ]; then
+ if [ -f /etc/sysconfig/system ]; then
. /etc/sysconfig/system
else
CLEAN_TMP=no
fi
+ # Read functions
+ . /etc/rc.d/init.d/functions
+
# Clean up /.
rm -f /fastboot /fsckoptions /forcefsck /halt /poweroff
Modified: initng/trunk/system/consolefont.i
==============================================================================
--- initng/trunk/system/consolefont.i (original)
+++ initng/trunk/system/consolefont.i Sun Feb 26 13:59:00 2006
@@ -12,11 +12,11 @@
[ -f /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n
+ . /etc/sysconfig/console
+
# Source function library
. /etc/rc.d/init.d/functions
- . /etc/sysconfig/console
-
# Checking if we have framebuffer enabled
if [ -f /proc/fb ]; then
# /proc shows as files with size=0, this is workaround
Modified: initng/trunk/system/hostname.i
==============================================================================
--- initng/trunk/system/hostname.i (original)
+++ initng/trunk/system/hostname.i Sun Feb 26 13:59:00 2006
@@ -2,9 +2,6 @@
need = system/initial;
script start = {
- # Read functions
- . /etc/rc.d/init.d/functions
-
# And sysconfig
if [ -f /etc/sysconfig/system ]; then
. /etc/sysconfig/system
@@ -18,6 +15,9 @@
HOSTNAME=localhost
fi
+ # Read functions
+ . /etc/rc.d/init.d/functions
+
# Set the hostname
run_cmd "$(nls 'Host:') ${HOSTNAME}" hostname ${HOSTNAME}
Modified: initng/trunk/system/initial.i
==============================================================================
--- initng/trunk/system/initial.i (original)
+++ initng/trunk/system/initial.i Sun Feb 26 13:59:00 2006
@@ -10,20 +10,17 @@
VSERVER=no
fi
- if [ "$VSERVER" = "yes" ]; then
- exit 0
- fi
-
- # Set the path
- export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+ # Read functions
+ . /etc/rc.d/init.d/functions
# PLD LiveCD support
if [ -x /etc/rc.d/rc.live ]; then
/etc/rc.d/rc.live
fi
- # Read functions
- . /etc/rc.d/init.d/functions
+ if [ "$VSERVER" = "yes" ]; then
+ exit 0
+ fi
# Choose Hardware profile
if [ -f /etc/sysconfig/hwprof ]; then
@@ -57,6 +54,7 @@
run_cmd "Setting default font" /sbin/setsysfont
fi
+ exit 0
}
}
Modified: initng/trunk/system/modules.i
==============================================================================
--- initng/trunk/system/modules.i (original)
+++ initng/trunk/system/modules.i Sun Feb 26 13:59:00 2006
@@ -2,19 +2,13 @@
need = system/initial system/mountroot;
script start = {
- # Set the path
- export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+ if [ -f /etc/sysconfig/system ]; then
+ . /etc/sysconfig/system
+ fi
# Read functions
. /etc/rc.d/init.d/functions
- # And sysconfig
- if [ -r /etc/sysconfig/system ]; then
- . /etc/sysconfig/system
- else
- VSERVER=no
- fi
-
if [ "$VSERVER" = "yes" ]; then
exit 0
fi
Modified: initng/trunk/system/mountfs.i
==============================================================================
--- initng/trunk/system/mountfs.i (original)
+++ initng/trunk/system/mountfs.i Sun Feb 26 13:59:00 2006
@@ -4,16 +4,12 @@
need = system/initial system/mountroot system/modules;
script start = {
- # Read functions
- . /etc/rc.d/init.d/functions
-
- # And sysconfig
- if [ -r /etc/sysconfig/system ]; then
+ if [ -f /etc/sysconfig/system ]; then
. /etc/sysconfig/system
- else
- VSERVER=no
fi
+ . /etc/rc.d/init.d/functions
+
if [ "$VSERVER" = "yes" ]; then
exit 0
fi
@@ -21,7 +17,8 @@
# Mount all other filesystems (except for NFS and /proc, which is already
# mounted). Contrary to standard usage,
# filesystems are NOT unmounted in single user mode.
-
run_cmd "Mounting local filesystems" mount -a -t nonfs,smbfs,ncpfs,proc,cifs -O no_netdev
+
+ exit 0
}
}
Modified: initng/trunk/system/mountroot.i
==============================================================================
--- initng/trunk/system/mountroot.i (original)
+++ initng/trunk/system/mountroot.i Sun Feb 26 13:59:00 2006
@@ -4,14 +4,13 @@
need = system/initial;
script start = {
- # Read functions
- . /etc/rc.d/init.d/functions
-
- # And sysconfig
- if [ -r /etc/sysconfig/system ]; then
+ if [ -f /etc/sysconfig/system ]; then
. /etc/sysconfig/system
fi
+ # Read functions
+ . /etc/rc.d/init.d/functions
+
if is_yes "$VSERVER"; then
exit 0
fi
More information about the pld-cvs-commit
mailing list