summaryrefslogtreecommitdiffstats
path: root/initramfs
diff options
context:
space:
mode:
authorDirk von Suchodoletz2009-07-19 15:43:36 +0200
committerDirk von Suchodoletz2009-07-19 15:43:36 +0200
commitf3e90ff3d1524896d40fd9160bbf69cd4acd99c2 (patch)
tree7cdbde389b54a9a2b496ed4793bff517176e2304 /initramfs
parentModified uclibc-wrapper to be used in stage4 too (see r3017). (diff)
downloadcore-f3e90ff3d1524896d40fd9160bbf69cd4acd99c2.tar.gz
core-f3e90ff3d1524896d40fd9160bbf69cd4acd99c2.tar.xz
core-f3e90ff3d1524896d40fd9160bbf69cd4acd99c2.zip
Updating several stage3 scripts, e.g. for the cifs mounting ...
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@3019 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs')
-rwxr-xr-xinitramfs/stage3-stuff/bin/hwautocfg25
-rwxr-xr-xinitramfs/stage3-stuff/bin/servconfig11
-rw-r--r--initramfs/stage3-stuff/etc/functions11
3 files changed, 22 insertions, 25 deletions
diff --git a/initramfs/stage3-stuff/bin/hwautocfg b/initramfs/stage3-stuff/bin/hwautocfg
index 3a9d8b16..6dedda77 100755
--- a/initramfs/stage3-stuff/bin/hwautocfg
+++ b/initramfs/stage3-stuff/bin/hwautocfg
@@ -37,6 +37,8 @@ ash /etc/modprobe.base; mdev -s
( hwinfo --pci >/etc/hwinfo.data; echo "read pci device list at $(sysup)" \
>/tmp/hwdataready ) &
( usleep 100000 ; hwinfo --bios >/etc/hwinfo.bios ) &
+# for mounting partitions/devices with the "auto" option
+echo -e "ext3\next2\nreiserfs\nxfs\njfs\next4\nvfat" >/etc/filesystems
return 0
}
@@ -143,19 +145,18 @@ if [ -s /etc/hwinfo.disk ] ; then
noexec\t 0 0" >>/tmp/fstab
elif [ ${partid} -eq 45 ] ; then
# if more than one id45 present, the latter ones are simply mounted
- # over the previous
- mount -t auto ${hdpartnr} /mnt/media/${hdpartnr#/dev/*} &
- ln -sf /media/${hdpartnr#/dev/*} /mnt/var/scratch
- mount -t auto $hdpartnr /mnt/media/${hdpartnr#/dev/*} && \
- echo -e "$hdpartnr\t/media/${hdpartnr#/dev/*}\tauto\t\tnoauto,\
-\t 0 0" >>/tmp/fstab
+ # over the previous (the mounts are postponed a bit via do_mnt to
+ # have the filesystem completely prepared)
+ echo -e "mount -t auto $hdpartnr /mnt/media/${hdpartnr#/dev/*}\n\
+ ln -sf /media/${hdpartnr#/dev/*} /mnt/var/scratch" >>/etc/do_mnt
+ echo -e "$hdpartnr\t/media/${hdpartnr#/dev/*}\tauto\t\tnoauto\
+\t\t 0 0" >>/tmp/fstab
elif [ ${partid} -eq 46 ] ; then
# mount a home directory to (/mnt)/var/home
- mount -t auto ${hdpartnr} /mnt/media/${hdpartnr#/dev/*} &
- test -d /mnt/media/${hdpartnr#/dev/*}/home && \
- ln -sf /media/${hdpartnr#/dev/*} /mnt/var/home
- mount -t auto $hdpartnr /mnt/media/${hdpartnr#/dev/*} && \
- echo -e "$hdpartnr\t/media/${hdpartnr#/dev/*}\tauto\t\tnoauto,\
+ echo -e "mount -t auto $hdpartnr /mnt/media/${hdpartnr#/dev/*} \n\
+ test -d /mnt/media/${hdpartnr#/dev/*}/home && \
+ ln -sf /media/${hdpartnr#/dev/*} /mnt/var/home" >>/etc/do_mnt
+ echo -e "$hdpartnr\t/media/${hdpartnr#/dev/*}\tauto\t\tnoauto,\
\t 0 0" >>/tmp/fstab
fi
done
@@ -173,6 +174,8 @@ fi
# cleanup/finishing part
finish () {
mdev -s
+# mount filesystem parts requested in disk setup
+ash /etc/do_mnt
# remove unneeded disk and mouse drivers
[ ! -s /etc/hwinfo.disk ] && rmmod sd_mod 2>/dev/null
#grep -q " PS/2 " /etc/hwinfo.mouse || \
diff --git a/initramfs/stage3-stuff/bin/servconfig b/initramfs/stage3-stuff/bin/servconfig
index 96c6a612..b44d57cf 100755
--- a/initramfs/stage3-stuff/bin/servconfig
+++ b/initramfs/stage3-stuff/bin/servconfig
@@ -297,16 +297,7 @@ if [ -n "$scratch" -a -z "$tmpisdisk" ] ; then
# no need for tempfs there ...
umount /mnt/tmp >/dev/null 2>&1
fsmount nfs ${tmpserv} ${tmppath} /mnt/tmp \
- "rw,intr,soft,timeo=2,nosuid"
- # somehow we need to move it to the vmware plugin. Any ideas
- # how to handle the dependencies?
- # create an empty container file for vmware *.vmem, it does not
- # like to live on NFS exports
- if [ "x$vmware" != "x" -a "x$vmware" != "xno" ] ; then
- dd if=/dev/zero of=/mnt/tmp/vm-container count=1 seek=2048000
- diskfm /mnt/tmp/vm-container /mnt/tmp/vmware
- chmod a+rwxt /mnt/tmp/vmware
- fi; }
+ "rw,intr,soft,timeo=2,nosuid"; }
;;
esac
fi
diff --git a/initramfs/stage3-stuff/etc/functions b/initramfs/stage3-stuff/etc/functions
index 7eeb6d44..7731790c 100644
--- a/initramfs/stage3-stuff/etc/functions
+++ b/initramfs/stage3-stuff/etc/functions
@@ -145,7 +145,6 @@ case "${proto}" in
# autodetected here ... (vmimgserv is blockdev here)
vmbdev=/dev/${server}
waitfor ${vmbdev} 20000
- echo -e "ext2\nreiserfs\nvfat\nxfs" >/etc/filesystems
mount -o ro ${vmbdev} ${target} || error "$scfg_evmlm" nonfatal
;;
nfs)
@@ -160,8 +159,12 @@ case "${proto}" in
done
;;
smb|cifs)
- mount -n -o ${mntopt},user=guest,guest,file_mode=0755,dir_mode=0755 \
- -t ${proto} //${server}${srcpath} ${target}
+ # for some reason cifs mounts cannot be pivoted :(
+ #mount -n -o ${mntopt},user=guest,guest,file_mode=0755,dir_mode=0755 \
+ # -t ${proto} //${server}${srcpath} ${target}
+ d_mkrlscript entry boot.slx "uclibc-wrapper mount -n -o ${mntopt},guest,\
+user=guest,file_mode=0755,dir_mode=0755 -t ${proto} //${server}${srcpath} \
+${target#/mnt}"
;;
esac
}
@@ -985,7 +988,7 @@ config_printer () {
config_bt () {
:
}
-# create a compliant runlevel script, needed for boot.slx and vmware-prep
+# create a compliant runlevel script, needed for boot.slx
d_mkrlscript () {
:
}