diff options
author | Dirk von Suchodoletz | 2007-05-05 18:52:40 +0200 |
---|---|---|
committer | Dirk von Suchodoletz | 2007-05-05 18:52:40 +0200 |
commit | 551eadaad5a012df62de3c6f6e7985439a759135 (patch) | |
tree | 88556396c3dae3ba78868451d8281471fb129dc7 | |
parent | * mkdxsinitrd now determines DISTRO and DISTRO_VER from the given ROOTPATH (diff) | |
download | core-551eadaad5a012df62de3c6f6e7985439a759135.tar.gz core-551eadaad5a012df62de3c6f6e7985439a759135.tar.xz core-551eadaad5a012df62de3c6f6e7985439a759135.zip |
Started to remove distro-specific udev from stage3 (was already done for
mkdxsinitrd, so no need there :-)), please check for other distros too
(see tickets #129, #130) ...
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1002 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r-- | initramfs/distro-specs/suse/functions-10.1 | 32 | ||||
-rw-r--r-- | initramfs/distro-specs/suse/functions-10.2 | 36 | ||||
-rw-r--r-- | initramfs/distro-specs/suse/functions-10.3 | 36 | ||||
-rw-r--r-- | initramfs/distro-specs/suse/functions-9.3 | 8 | ||||
-rw-r--r-- | initramfs/initrd-stuff/etc/functions | 5 | ||||
-rw-r--r-- | initramfs/initrd-stuff/etc/messages | 2 | ||||
-rw-r--r-- | initramfs/initrd-stuff/etc/messages.de | 2 | ||||
-rwxr-xr-x | initramfs/initrd-stuff/init | 14 |
8 files changed, 15 insertions, 120 deletions
diff --git a/initramfs/distro-specs/suse/functions-10.1 b/initramfs/distro-specs/suse/functions-10.1 index c71dae9d..eff30cc2 100644 --- a/initramfs/distro-specs/suse/functions-10.1 +++ b/initramfs/distro-specs/suse/functions-10.1 @@ -13,38 +13,6 @@ # in general SuSE base definitions ... General changes should be done there, # version specific changes for the 10.1 go here. -# some specific stuff to initialize -preinit () { -# fake the existence of some helper binaries (which are not of any use -# within initialramfs) -shell="/bin/sh" -[ -x /bin/busybox ] && shell="/bin/ash" -for i in usb_id scsi_id vol_id edd_id ata_id path_id hwup ifup ; do - echo -e "#!$shell\n:" >/sbin/$i -done -mkdir /lib/udev /usr/sbin -for i in idedma.sh mount.sh rename_netiface \ - firmware.sh create_floppy_devices ; do - echo -e "#!$shell\n:" >/lib/udev/$i -done -echo -e "#!$shell\n:" >/usr/sbin/alsactl -rm /etc/udev/rules.d/60-persistent-storage.rules 2>/dev/null -chmod u+x /sbin/* /lib/udev/* /usr/sbin/* -} - -# udev service -udev_hotplug () { -local result=0 -if [ -x /bin/udevd ] ; then - echo "" > /proc/sys/kernel/hotplug - udevd --daemon || result=1 - trigger_device_events - usleep 50 -else error "$df_errudev" nonfatal -fi -return $result -} - # afs client # configure afs client config_afs () { diff --git a/initramfs/distro-specs/suse/functions-10.2 b/initramfs/distro-specs/suse/functions-10.2 index 1e3956c6..02fdfd89 100644 --- a/initramfs/distro-specs/suse/functions-10.2 +++ b/initramfs/distro-specs/suse/functions-10.2 @@ -13,29 +13,6 @@ # in general SuSE base definitions ... General changes should be done there, # version specific changes for the 10.2 go here. -# some specific stuff to initialize -preinit () { -# fake the existence of some helper binaries/scripts (which are not of any use -# within initialramfs) -local item -if [ ! -x /bin/busybox ] ; then - for item in hwup ifup ; do - echo -e "#!/bin/sh\n:" >/sbin/${item} - done - mkdir -p /lib/udev /usr/sbin - for item in usb_id scsi_id vol_id edd_id ata_id path_id cdrom_id idedma.sh \ - mount.sh rename_netiface firmware.sh create_floppy_devices \ - trigger_firmware_loading.sh ; do - echo -e "#!/bin/sh\n# do nothing here\n:" >/lib/udev/${item} - done - echo -e "#!/bin/sh\n:" >/usr/sbin/alsactl - rm /etc/udev/rules.d/60-persistent-storage.rules 2>/dev/null - chmod u+x /sbin/* /lib/udev/* /usr/sbin/* - echo -e "tty:x:5:\ndisk:x:6:\nlp:x:7:\nkmem:x:9:\nuucp:x:14:\n\ -dialout:x:16:\naudio:x:17:\nvideo:x:33:\nvboxusers:!:1000:" > /etc/group - echo -e "root:x:0:0:::\nasterisk:x:106:16:::" > /etc/passwd -fi -} # display manager configuration config_kdm () { # first define directories for kdm @@ -49,19 +26,6 @@ config_dm_entry yes # write configuration file with general config from /etc/functions config_kdm_template } -# udev service - auto creation of device files -udev_hotplug () { -local result=0 -echo "Starting udev" -if [ -x /bin/udevd ] ; then - echo "" > /proc/sys/kernel/hotplug - udevd --daemon 2>/dev/null || result=1 - trigger_device_events - usleep 50 -else error "$df_errudev" nonfatal -fi -return $result -} # configure dbus (inter application communication for kde and gnome), hal # (hardware abstraction layer - used e.g. by powersaved), resmgr and # policykitd (resource manager/policykitd - the user gets permissions to diff --git a/initramfs/distro-specs/suse/functions-10.3 b/initramfs/distro-specs/suse/functions-10.3 index c43f2a94..63523a9d 100644 --- a/initramfs/distro-specs/suse/functions-10.3 +++ b/initramfs/distro-specs/suse/functions-10.3 @@ -13,29 +13,6 @@ # defined in general SuSE base definitions ... General changes should be done # there, version specific changes for the 10.3 go here. -# some specific stuff to initialize -preinit () { -# fake the existence of some helper binaries/scripts (which are not of any use -# within initialramfs) -local item -if [ ! -x /bin/busybox ] ; then - for item in hwup ifup ; do - echo -e "#!/bin/sh\n:" >/sbin/${item} - done - mkdir -p /lib/udev /usr/sbin - for item in usb_id scsi_id vol_id edd_id ata_id path_id cdrom_id idedma.sh \ - mount.sh rename_netiface firmware.sh create_floppy_devices \ - trigger_firmware_loading.sh ; do - echo -e "#!/bin/sh\n# do nothing here\n:" >/lib/udev/${item} - done - echo -e "#!/bin/sh\n:" >/usr/sbin/alsactl - rm /etc/udev/rules.d/60-persistent-storage.rules 2>/dev/null - chmod u+x /sbin/* /lib/udev/* /usr/sbin/* - echo -e "tty:x:5:\ndisk:x:6:\nlp:x:7:\nkmem:x:9:\nuucp:x:14:\n\ -dialout:x:16:\naudio:x:17:\nvideo:x:33:\nvboxusers:!:1000:" > /etc/group - echo -e "root:x:0:0:::\nasterisk:x:106:16:::" > /etc/passwd -fi -} # display manager configuration config_kdm () { # first define directories for kdm @@ -49,19 +26,6 @@ config_dm_entry yes # write configuration file with general config from /etc/functions config_kdm_template } -# udev service - auto creation of device files -udev_hotplug () { -local result=0 -echo "Starting udev" -if [ -x /bin/udevd ] ; then - echo "" > /proc/sys/kernel/hotplug - udevd --daemon 2>/dev/null || result=1 - trigger_device_events - usleep 50 -else error "$df_errudev" nonfatal -fi -return $result -} # configure dbus (inter application communication for kde and gnome), hal # (hardware abstraction layer - used e.g. by powersaved), resmgr and # policykitd (resource manager/policykitd - the user gets permissions to diff --git a/initramfs/distro-specs/suse/functions-9.3 b/initramfs/distro-specs/suse/functions-9.3 index 36bf5b13..efd88b35 100644 --- a/initramfs/distro-specs/suse/functions-9.3 +++ b/initramfs/distro-specs/suse/functions-9.3 @@ -13,13 +13,7 @@ # in general SuSE base definitions ... General changes should be done there, # version specific changes for the 9.3 go here. -# distro specific stuff to initialize -postinit () { - # for some reason the udev daemon does not create the needed device files - udevstart -} - -# udev/hotplug - auto device discovery service +# udev/hotplug - auto device discovery service (deprecated) udev_hotplug () { local result=0 [ -d /etc/hotplug -a -d /etc/hotplug.d ] || error "$df_errhotpl" nonfatal diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions index fa4f2ba4..fa10b8f9 100644 --- a/initramfs/initrd-stuff/etc/functions +++ b/initramfs/initrd-stuff/etc/functions @@ -35,7 +35,7 @@ udev_hotplug () { } ############################################################################# -# generate events with the sysfs trigger +# generate events with the sysfs trigger (most probably obsolete) trigger_device_events () { local list=$(echo /sys/bus/*/devices/*/uevent) list="$list $(echo /sys/class/*/*/uevent)" @@ -63,7 +63,8 @@ trigger_device_events () { } ############################################################################# -# mini udev of busybox or distro specific udev_hotplug +# mini udev of busybox (most probably obsolete: or distro specific +# udev_hotplug) runudev () { if [ -x /bin/mdev ] ; then mdev -s diff --git a/initramfs/initrd-stuff/etc/messages b/initramfs/initrd-stuff/etc/messages index b9df8dea..32791bd6 100644 --- a/initramfs/initrd-stuff/etc/messages +++ b/initramfs/initrd-stuff/etc/messages @@ -138,9 +138,11 @@ detection\nwill probably arise." df_errserv="seems not to be installed or start script is\n not available\ so requesting the start of service make no sense. Please\n disable service\ or install the files/packages needed." +# udev stuff will be handled via busybox mdev ... df_errudev=" udev daemon is not available. Some devices might not appear." df_errhotpl=" Hotplug subdirectory is missing! udev(d) might not work as \ expected." +### df_errcron=" The cron start script $df_errserv" df_errsysl=" The syslog start script $df_errserv" df_errsshd=" The sshd start script $df_errserv" diff --git a/initramfs/initrd-stuff/etc/messages.de b/initramfs/initrd-stuff/etc/messages.de index feb7957d..a26b97da 100644 --- a/initramfs/initrd-stuff/etc/messages.de +++ b/initramfs/initrd-stuff/etc/messages.de @@ -145,10 +145,12 @@ werden Probleme bei der Hardware-Erkennung auftreten." df_errserv="ist entweder nicht installiert oder das Start-Skript ist nicht \ verfuegbar.\n Deswegen macht der Start des Dienstes keinen Sinn. Bitte \ deaktivieren Sie den Start\n oder installieren Sie die benoetigten Dateien." +### unnoetig wg. mdev df_errudev=" Der udev Daemon ist nicht verfuegbar. Einige Geraetedateien \ koennten nicht angelegt worden sein." df_errhotpl=" Das Udev/Hotplug Unterverzeichnis fehlt! udev(d) koennte nicht \ wie erwartet ablaufen." +### df_errcron=" Das cron Start-Skript $df_errserv" df_errsysl=" Das syslog Start-Skript $df_errserv" df_errsshd=" Das sshd Start-Skript $df_errserv" diff --git a/initramfs/initrd-stuff/init b/initramfs/initrd-stuff/init index 463376b4..b90b60b9 100755 --- a/initramfs/initrd-stuff/init +++ b/initramfs/initrd-stuff/init @@ -514,7 +514,8 @@ if [ -n "${unionfs}" -o -n "${aufs}" ] ; then mkdir -p /mnt/uniontmp mount -n --move ${rwdir}/uniontmp /mnt/uniontmp chmod 0755 /mnt/uniontmp /mnt - # run ldconfig if not switched off via kernel command line + # run ldconfig if switched on via kernel command line (token ldsc) or + # triggered by unionized root filesystem ldcfg # runlevel directories should contain no links for i in ${D_RCDIRS} ${D_INITBOOTD} ; do @@ -557,14 +558,13 @@ elif [ -z "${cowloop}" ] ; then [ -n "${ldsc}" ] && echo -e "ld.so.cache*" >>/tmp/etc.exclude # for tar exclude lists might be used, more difficult for cp cd /mnt - tar -X /tmp/etc.exclude -cp etc/* | \ - tar -xp -C ${rwdir} 2>/dev/null ; + tar -X /tmp/etc.exclude -cp etc/*|tar -xp -C ${rwdir} 2>/dev/null cd / mount -n --bind ${rwdir}/etc /mnt/etc mount -n --bind ${rwdir}/var /mnt/var # get the "covered" mounts back into filesystem structure - for i in ${list}; do - mount -n --move /root/$i /mnt/$i #>>$LOGFILE 2>&1 + for path in ${list}; do + mount -n --move /root/$path /mnt/$path #>>$LOGFILE 2>&1 done #rm -rf /root/* >/dev/null 2>&1 # run some specific stuff !? @@ -655,7 +655,7 @@ if [ -n "$uniondirs" ]; then include_in_fsroot_union "$union_type" "$uniondirs" fi -# post init for some distro specific (fixme!! more elegant solution) +# post init for some distro specific postinit [ -s /initramfs/postinit.local ] && \ mv /initramfs/postinit.local /bin/postinit.local @@ -669,7 +669,7 @@ postinit # unmount the bind mounted modules directory export ticks -for ticks in 0 200 300 500 800 1000 1200 2000 5000 ; do +for ticks in 0 400 1000 2000 5000 10000 ; do usleep $ticks && umount -n /lib/modules/${KERNEL} 2>/dev/null && break error "$init_wait" nonfatal done |