diff options
Diffstat (limited to 'initramfs')
-rw-r--r-- | initramfs/distro-specs/suse/functions-default | 13 | ||||
-rw-r--r-- | initramfs/distro-specs/ubuntu/functions-default | 8 | ||||
-rwxr-xr-x | initramfs/initrd-stuff/init | 27 |
3 files changed, 19 insertions, 29 deletions
diff --git a/initramfs/distro-specs/suse/functions-default b/initramfs/distro-specs/suse/functions-default index 6783e91d..37bc5539 100644 --- a/initramfs/distro-specs/suse/functions-default +++ b/initramfs/distro-specs/suse/functions-default @@ -475,11 +475,9 @@ fi config_automount () { if [ -e /mnt/etc/${D_SYSCONFDIR}/autofs ] ; then testmkd /var/lock/subsys - echo -e "# /etc/${D_SYSCONFDIR}/autofs - file modified by\n#\t$0:\n#" \ - > /etc/autofs - sed -e "s,AUTOFS_OPTIONS.*,AUTOFS_OPTIONS=\"--timeout 3\"," \ - /mnt/etc/${D_SYSCONFDIR}/autofs >> /etc/autofs - cp /etc/autofs /mnt/etc/${D_SYSCONFDIR}/autofs + sed -e "1i# /etc/${D_SYSCONFDIR}/autofs - file modified by\n#\t$0:\n#" \ + -e "s,AUTOFS_OPTIONS.*,AUTOFS_OPTIONS=\"--timeout 3\"," \ + -i /mnt/etc/${D_SYSCONFDIR}/autofs rllinker "autofs" "18" "04" else error "$df_erramt" nonfatal @@ -526,11 +524,6 @@ if [ -f /mnt/etc/${D_SYSCONFDIR}/vmware ] ; then /mnt/etc/${D_INITDIR}/.depend.start >> /etc/.depend.start echo "vmware-prep: " >> /etc/.depend.start cp /etc/.depend.start /mnt/etc/${D_INITDIR}/.depend.start - # this line should be added to /etc/hotplug.d/usb/50-usb.hotplug - # to block linux from handling usb events during vmware sessions - #sed -e '/USB-specific/{;i\' \ - # -e 'ps aux |grep -i vmware| grep -v "grep" >/dev/null 2>&1 && exit 0' \ - # -e ' }' -i /mnt/etc/hotplug.d/usb/50-usb.hotplug else error "df_errvmw" nonfatal fi diff --git a/initramfs/distro-specs/ubuntu/functions-default b/initramfs/distro-specs/ubuntu/functions-default index a2e6de7c..2d0da092 100644 --- a/initramfs/distro-specs/ubuntu/functions-default +++ b/initramfs/distro-specs/ubuntu/functions-default @@ -441,11 +441,9 @@ if [ -f /mnt/etc/init.d/autofs ] ; then echo -e "*\t-rsize=32768,wsize=32768,tcp,rw\t${automnt_src}/&" \ >> /mnt/etc/auto.${automnt_dir} fi - echo -e "# /etc/sysconfig/autofs - file modified by\n#\t$0:\n#" \ - > /etc/autofs - sed -e "s,AUTOFS_OPTIONS.*,AUTOFS_OPTIONS=\"--timeout 3\"," \ - /mnt/etc/${D_SYSCONFDIR}/autofs >> /etc/autofs - cp /etc/autofs /mnt/etc/${D_SYSCONFDIR}/autofs + sed -e "1i# /etc/${D_SYSCONFDIR}/autofs - file modified by\n#\t$0:\n#" \ + -e "s,AUTOFS_OPTIONS.*,AUTOFS_OPTIONS=\"--timeout 3\"," \ + -i /mnt/etc/${D_SYSCONFDIR}/autofs config_portmap rllinker "autofs" "18" "04" fi diff --git a/initramfs/initrd-stuff/init b/initramfs/initrd-stuff/init index 7dbbdad3..abe6b428 100755 --- a/initramfs/initrd-stuff/init +++ b/initramfs/initrd-stuff/init @@ -142,22 +142,22 @@ in $0\ncountry=\"${COUNTRY}\"" >> /etc/machine-setup # if ld.so.cache should not be generated noldsc) noldsc=yes;; - # additional source to unify root filesystem with + # simple union of base ro rootdir with tempfs on top + unionfs) + unionfs=1;; + # additional source to unify root filesystem with; the top layer will be + # the tempfs unionfs=*) unionfs=1 uniondirs=${opts#unionfs=} ;; - # if unionfs should be used over the complete root filesystem - unionfs) - unionfs=1;; - # Same for AUFS + # same for AUFS; alternative to unionfs + aufs) + aufs=1;; aufs=*) aufs=1 uniondirs=${opts#aufs=} ;; - # if unionfs should be used over the complete root filesystem - aufs) - aufs=1;; # if cowloop should be used, only ontop of network block device and in # combination with classical fs, like ext2 useful cowloop=*) @@ -384,14 +384,13 @@ if [ -n "${nbdmod}" ] ; then if [ -n "${cowloop}" -a -x /bin/cowdev ] ; then modprobe ${MODPRV} cowloop || { error "$init_loadcow" nonfatal - cowloop=""; } + unset cowloop; } [ -x /bin/mdev ] && mdev -s fi if [ -n "${cowloop}" ] ; then if [ -n "${unionfs}" -o -n "${aufs}" ] ; then error "$init_cownonbd" - unionfs=""; - aufs=""; + unset unionfs aufs fi echo "Using Copy-on-Write block device for rw access" mount -n -t tmpfs -o size=${cowsize} ramfs ${rwdir} @@ -406,7 +405,7 @@ if [ -n "${nbdmod}" ] ; then ldcfg else # use normal UnionFS behaviour because rootfs is not NFS - nfsro="" + unset nfsro fi # finally mount the block device for i in 1 50 100 200 400 1000 ; do @@ -466,7 +465,7 @@ if [ -n "${unionfs}" ]; then modprobe ${MODPRV} unionfs && union_type="UnionFS" if [ -z "$union_type" ]; then error "$init_loadufs" nonfatal - unionfs=""; + unset unionfs # if unionfs is not available, check for aufs and inform user modprobe ${MODPRV} -n aufs && error $init_noufs_butaufs fi @@ -476,7 +475,7 @@ if [ -n "${aufs}" ]; then modprobe ${MODPRV} aufs && union_type="AUFS" if [ -z "$union_type" ]; then error "$init_loadaufs" nonfatal - aufs=""; + unset aufs # if aufs is not available, check for unionfs and inform user modprobe ${MODPRV} -n unionfs && error $init_noaufs_butufs fi |