Author: glen
Date: Mon Mar 13 16:10:46 2006
New Revision: 7155

Added:
   initng/trunk/system/rc-sysinit.i
Removed:
   initng/trunk/system/cleanfs.i
   initng/trunk/system/clock.i
   initng/trunk/system/consolefont.i
   initng/trunk/system/dmesg.i
   initng/trunk/system/initial.i
   initng/trunk/system/mountdev.i
   initng/trunk/system/mountfs.i
   initng/trunk/system/swap.i
Modified:
   initng/trunk/daemon/vservers.i
   initng/trunk/system.runlevel
   initng/trunk/system/hostname.i
   initng/trunk/system/modules.i
   initng/trunk/system/mountroot.i
   initng/trunk/system/rundir.i
   initng/trunk/system/sysinit.i
Log:
- removed splitout .i files and using plain rc.sysinit. LVM works now.


Modified: initng/trunk/daemon/vservers.i
==============================================================================
--- initng/trunk/daemon/vservers.i      (original)
+++ initng/trunk/daemon/vservers.i      Mon Mar 13 16:10:46 2006
@@ -2,6 +2,7 @@
 service daemon/vservers {
        need = system/rundir;
        need = daemon/vprocunhide;
+       need = daemon/network;
 
        exec start = /etc/rc.d/init.d/vservers start;
        exec stop = /etc/rc.d/init.d/vservers stop;

Modified: initng/trunk/system.runlevel
==============================================================================
--- initng/trunk/system.runlevel        (original)
+++ initng/trunk/system.runlevel        Mon Mar 13 16:10:46 2006
@@ -1,13 +1,3 @@
-#net/lo
-daemon/agetty
-system/cleanfs
-system/clock
-system/consolefont
-system/dmesg
-system/hostname
+system/rc-sysinit
 system/local
-system/modules
-system/mountfs
-system/mountroot
-system/swap
-system/sysinit
+daemon/agetty

Modified: initng/trunk/system/hostname.i
==============================================================================
--- initng/trunk/system/hostname.i      (original)
+++ initng/trunk/system/hostname.i      Mon Mar 13 16:10:46 2006
@@ -1,31 +1,3 @@
-service system/hostname {
-       need = system/initial;
-
-       script start = {
-               # And sysconfig
-               if [ -f /etc/sysconfig/system ]; then
-                       . /etc/sysconfig/system
-               fi
-
-               # Read network config data
-               if [ -r /etc/sysconfig/network ]; then
-                       . /etc/sysconfig/network
-               else
-                       NETWORKING=no
-                       HOSTNAME=localhost
-               fi
-
-               # Read functions
-               . /etc/rc.d/init.d/functions
-
-               # Set the hostname
-               run_cmd "$(nls 'Host:') ${HOSTNAME}" hostname ${HOSTNAME}
-
-               # Set the NIS domain name
-               if [ -n "$NISDOMAIN" ]; then
-                       run_cmd "$(nls 'NIS Domain:') ${NISDOMAIN}" domainname 
$NISDOMAIN
-               else
-                       domainname ""
-               fi
-       }
+virtual system/hostname {
+       need = system/rc-sysinit;
 }

Modified: initng/trunk/system/modules.i
==============================================================================
--- initng/trunk/system/modules.i       (original)
+++ initng/trunk/system/modules.i       Mon Mar 13 16:10:46 2006
@@ -1,100 +1,3 @@
-service system/modules {
-       need = system/initial system/mountroot;
-
-       script start = {
-               if [ -f /etc/sysconfig/system ]; then
-                       . /etc/sysconfig/system
-               fi
-
-               # Read functions
-               . /etc/rc.d/init.d/functions
-
-               if [ "$VSERVER" = "yes" ]; then
-                       exit 0
-               fi
-
-               # Should not fail if kernel do not have module
-               # support compiled in ...
-               if [ ! -f /proc/modules ]; then
-                       USEMODULES=
-               elif ! grep -iq nomodules /proc/cmdline; then
-                       USEMODULES=y
-               else
-                       USEMODULES=
-               fi
-
-               # Run depmod if RUN_DEPMOD != "no" and:
-               # a) user requested or RUN_DEPMOD="";
-               # b) modules.dep is missing
-               # c) modules.dep is older than /etc/modules.conf or 
/lib/modules/`uname -r`
-               if ! is_no "$RUN_DEPMOD" && [ -n "$USEMODULES" ]; then
-                               if is_yes "$RUN_DEPMOD" || [ -z "$RUN_DEPMOD" 
]; then
-                               run_cmd "Finding module dependencies" depmod -a
-                       elif [ "$RUN_DEPMOD" = "ifmissing" ]; then
-                               run_cmd "Finding module dependencies" depmod -A
-                       fi
-               fi
-
-               if [ -f /proc/sys/kernel/modprobe ]; then
-                       if [ -n "$USEMODULES" ]; then
-                               sysctl -w kernel.modprobe="/sbin/modprobe" 
>/dev/null 2>&1
-                               sysctl -w kernel.hotplug="/sbin/hotplug" 
>/dev/null 2>&1
-                       else
-                               # We used to set this to NULL, but that causes
-                               # 'failed to exec' messages"
-                               sysctl -w kernel.modprobe="/bin/true" 
>/dev/null 2>&1
-                               sysctl -w kernel.hotplug="/bin/true" >/dev/null 
2>&1
-                       fi
-               fi
-
-               # Initialize USB controllers
-               usb=0
-               if ! grep -iq "nousb" /proc/cmdline 2>/dev/null && ! grep -q 
"usb" /proc/devices 2>/dev/null ; then
-                       aliases=$(/sbin/modprobe -c | awk '/^alias 
usb-controller/ { print $3 }')
-                       if [ -n "$aliases" -a "$aliases" != "off" ] ; then
-                               /sbin/modprobe -k usbcore
-                               for alias in $aliases ; do
-                                       [ "$alias" = "off" ] && continue
-                                       run_cmd "$(nls 'Initializing USB 
controller') ($alias)" /sbin/modprobe $alias
-                               done
-                               [ $? -eq 0 -a -n "$aliases" ] && usb=1
-                       fi
-                       if grep -iq "usb" /proc/devices 2>/dev/null ; then
-                               usb=1
-                       fi
-               fi
-
-               if [ "$usb" = "1" -a ! -f /proc/bus/usb/devices ]; then
-                       run_cmd "Mounting USB filesystem" mount -t usbfs usbfs 
/proc/bus/usb
-               fi
-
-               needusbstorage=;
-               if [ "$usb" = "1" ]; then
-                       needusbstorage=$(LC_ALL=C cat /proc/bus/usb/devices 
2>/dev/null|grep -e "^I.*Cls=08");
-                       if [ "$(kernelverser)" -lt "002006" ]; then
-                               LC_ALL=C grep -q 'hid' /proc/bus/usb/drivers 2> 
/dev/null || run_cmd "Initializing USB HID interface" modprobe hid 2> /dev/null
-                               mouseoutput=$(cat /proc/bus/usb/devices 
2>/dev/null|grep -E "^I.*Cls=03.*Prot=02")
-                               kbdoutput=$(cat /proc/bus/usb/devices 
2>/dev/null|grep -E "^I.*Cls=03.*Prot=01")
-                               if [ -n "$kbdoutput" ]; then
-                                       run_cmd "Initializing USB keyboard" 
modprobe keybdev
-                               fi
-                               if [ -n "$mouseoutput" ]; then
-                                       run_cmd "Initializing USB mouse" 
modprobe mousedev
-                               fi
-                       fi
-               fi
-
-
-               # Load usb storage here, to match most other things
-               if [ -n "$needusbstorage" ]; then
-                               modprobe -k usb-storage >/dev/null 2>&1
-               fi
-
-               # Load modules
-               if [ -x /etc/rc.d/rc.modules ]; then
-                       /etc/rc.d/rc.modules
-               fi
-
-               exit 0
-       }
+virtual system/modules {
+       need = system/rc-sysinit;
 }

Modified: initng/trunk/system/mountroot.i
==============================================================================
--- initng/trunk/system/mountroot.i     (original)
+++ initng/trunk/system/mountroot.i     Mon Mar 13 16:10:46 2006
@@ -1,178 +1,3 @@
-# mounts rootfs rw
-
-service system/mountroot {
-       need = system/initial;
-
-       script start = {
-               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
-
-               if [ -f /fastboot ] || grep -iq "fastboot" /proc/cmdline 2> 
/dev/null ; then
-                       fastboot=yes
-               else
-                       fastboot=
-               fi
-
-               if [ -f /fsckoptions ]; then
-                       fsckoptions=$(cat /fsckoptions)
-               else
-                       fsckoptions=''
-               fi
-
-               if [ -f /forcefsck ]; then
-                       fsckoptions="-f $fsckoptions"
-               else
-                       # Obey the fs_passno setting for / (see fstab(5))
-                       # - find the / entry
-                       # - make sure we have 6 fields
-                       _ROOTFS_PASSNO=$(awk '($1 ~ /^(\/|UUID|LABEL)/ && $2 == 
"/" && NF == 6) { print $6}' /etc/fstab)
-               fi
-
-               _RUN_QUOTACHECK=0
-               _ROOTFS_TYPE=$(grep " / " /proc/mounts | awk '{ print $3 }')
-
-               if [ -z "$fastboot" -a "$_ROOTFS_TYPE" != "nfs" -a 
"$_ROOTFS_TYPE" != "romfs" -a "$_ROOTFS_PASSNO" != 0 ]; then
-                       show "Checking root filesystem"; started
-                       initlog -c "fsck -C -T -a $fsckoptions /"
-
-                       rc=$?
-
-                       # A return of 4 or higher means there were serious 
problems.
-                       if [ $rc -gt 3 ]; then
-                               [ -e /proc/splash ] && echo "verbose" > 
/proc/splash
-                               # don't use '\n' in nls macro !
-                               echo
-                               echo
-                               nls "*** An error occurred during the file 
system check."
-                               nls "*** Dropping you to a shell; the system 
will reboot"
-                               nls "*** when you leave the shell."
-                               echo
-
-                               PS1="$(nls '(Repair filesystem)# ')"; export PS1
-                               [ "$SELINUX" = "1" ] && disable_selinux
-                               if is_yes "$RUN_SULOGIN_ON_ERR"; then
-                                       /sbin/sulogin
-                               else
-                                       /bin/sh
-                               fi
-
-                               run_cmd "Unmounting file systems" umount -a
-                               mount -n -o remount,ro /
-                               run_cmd "Automatic reboot in progress" reboot
-                       # A return of 2 or 3 means that filesystem was repaired 
but we need
-                       # to reboot.
-                       elif [ "$rc" = "2" -o "$rc" = "3" ]; then
-                                       [ -e /proc/splash ] && echo "verbose" > 
/proc/splash
-                               echo
-                               nls "*** Filesystem was repaired but system 
needs to be"
-                               nls "*** rebooted before mounting it."
-                               nls "*** REBOOTING ***"
-                               echo
-
-                               run_cmd "Unmounting file systems" umount -a
-                               mount -n -o remount,ro /
-                               run_cmd "Automatic reboot in progress" reboot
-                       elif [ "$rc" = "1" ]; then
-                               _RUN_QUOTACHECK=1
-                       fi
-               fi
-
-               # Unmount the initrd, if necessary
-               if LC_ALL=C grep -q /initrd /proc/mounts && ! LC_ALL=C grep -q 
/initrd/loopfs /proc/mounts ; then
-                       if [ -e /initrd/dev/.devfsd ]; then
-                               umount /initrd/dev
-                       fi
-                       umount /initrd
-                       /sbin/blockdev --flushbufs /dev/ram0 >/dev/null 2>&1
-               fi
-
-               # Check for arguments 
-               if grep -iq nopnp /proc/cmdline; then
-                       PNP=
-               else
-                       PNP=yes
-               fi
-
-               # set up pnp and kernel pnp
-               if [ -n "$PNP" ]; then
-                       if is_yes "$RUN_USERPNP" && [ -x /sbin/isapnp -a -f 
/etc/isapnp/isapnp.conf ]; then
-                       run_cmd "Setting up ISA PNP devices (userspace pnp)" 
/sbin/isapnp /etc/isapnp/isapnp.conf
-                       fi
-                       if is_yes "$RUN_KERNELPNP"; then
-                       /sbin/modprobe -k isa-pnp 2> /dev/null
-                       if [ -e /proc/isapnp -a -f 
/etc/isapnp/isapnp-kernel.conf ]; then
-                               show "Setting up ISA PNP devices (kernelspace 
pnp)"; busy
-                               grep -v "^#" /etc/isapnp/isapnp-kernel.conf > 
/proc/isapnp && (deltext; ok) || (deltext; fail)
-                       fi
-                       fi
-               fi
-
-               # Remount the root filesystem read-write
-               run_cmd "Remounting root filesystem in rw mode" mount -n -o 
remount,rw /
-
-               # Update quotas if fsck was run on /
-               if [ "$_RUN_QUOTACHECK" = "1" -a -x /sbin/quotacheck ]; then
-                       run_cmd "Checking root filesystem quotas" 
/sbin/quotacheck -vnug /
-               fi
-
-               # Clean up SELinux labels
-               if [ -n "$SELINUX" ]; then
-                       for file in /etc/mtab /etc/cryptomtab /etc/ld.so.cache; 
do
-                               [ -r $file ] && restorecon $file >/dev/null 2>&1
-                       done
-               fi
-
-               # Clear mtab
-               :>/etc/mtab
-               [ -f /etc/cryptomtab ] && :>/etc/cryptomtab
-
-               # Remove stale backups
-               rm -f /etc/mtab~ /etc/mtab~~ /etc/cryptomtab~ /etc/cryptomtab~~
-
-               # Enter root, /proc, /sys, devfs and other into mtab.
-               mount -f /
-               mount -f /proc
-               [ -f /proc/bus/usb/devices ] && mount -f -t usbfs usbfs 
/proc/bus/usb
-               [ -e /dev/.devfsd ] && mount -f -t devfs devfs /dev
-
-               if grep -q sysfs /proc/mounts 2>/dev/null; then
-                       mount -f -t sysfs sysfs /sys
-                       if grep -q securityfs /proc/mounts 2>/dev/null ; then
-                                       mount -f -t securityfs securityfs 
/sys/kernel/security
-                       fi
-               fi
-
-               if grep -q selinuxfs /proc/mounts 2>/dev/null; then
-                       mount -f -t selinuxfs selinuxfs /selinux
-               fi
-
-               if grep -q cpuset /proc/mounts 2>/dev/null; then
-                       mount -f -t cpuset none /dev/cpuset
-               fi
-
-# FIXME: should be elsewhere
-               # Remove /etc/nologin when starting system
-               [ -f /etc/nologin.boot ] && rm -f /etc/nologin /etc/nologin.boot
-
-# $DELAY_LOGIN not handled. defeats the purpose of initng
-#              if is_yes "$DELAY_LOGIN" && [ ! -f /etc/nologin ]; then
-#                      show "Enabling Delay Login"; busy
-#                      echo > /etc/nologin
-#                      nls "System bootup in progress - please wait" >> 
/etc/nologin
-#                      echo >> /etc/nologin
-#                      chmod 644 /etc/nologin
-#                      cp -fp /etc/nologin /etc/nologin.boot
-#                      ok
-#              fi
-
-               exit 0
-       }
+virtual system/mountroot {
+       need = system/rc-sysinit;
 }

Added: initng/trunk/system/rc-sysinit.i
==============================================================================
--- (empty file)
+++ initng/trunk/system/rc-sysinit.i    Mon Mar 13 16:10:46 2006
@@ -0,0 +1,16 @@
+# rc.sysinit wrapper.
+# use this if you need LVM.
+service system/rc-sysinit {
+       script start = {
+               /etc/rc.d/rc.sysinit
+
+               # Send SIGHUP to initng pid 1, will reopen /dev/initctl and 
/dev/initng.
+               kill -HUP 1
+       }
+
+       script stop = {
+               sh -x /etc/rc.d/rc.shutdown
+               echo "shutdown done: $?"
+               exit 0
+       };
+}

Modified: initng/trunk/system/rundir.i
==============================================================================
--- initng/trunk/system/rundir.i        (original)
+++ initng/trunk/system/rundir.i        Mon Mar 13 16:10:46 2006
@@ -1,5 +1,3 @@
-# virtual that provides writable and cleaned up /var/run dir for pid and lock 
files
-# any init.d script should depend on this
 virtual system/rundir {
-       need = system/cleanfs;
+       need = system/rc-sysinit;
 }

Modified: initng/trunk/system/sysinit.i
==============================================================================
--- initng/trunk/system/sysinit.i       (original)
+++ initng/trunk/system/sysinit.i       Mon Mar 13 16:10:46 2006
@@ -1,4 +1,3 @@
-# virtual for backward compatible
 virtual system/sysinit {
-       need = system/initial system/mountfs system/mountroot;
+       need = system/rc-sysinit;
 }
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to