From 7f6936be59bc10253327a37c24b3e0a4df9f1c22 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Thu, 16 Jul 2009 16:56:05 +0000 Subject: Starting into handling of special partition IDs (45, 46), see wiki. * id45 for generic scratch (just mounted, not formatted) * id46 for special openslx directories (boot, config and home) Not completely implemented. git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@3009 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/stage3-stuff/bin/hwautocfg | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'initramfs/stage3-stuff/bin/hwautocfg') diff --git a/initramfs/stage3-stuff/bin/hwautocfg b/initramfs/stage3-stuff/bin/hwautocfg index 282707f0..5cb570bd 100755 --- a/initramfs/stage3-stuff/bin/hwautocfg +++ b/initramfs/stage3-stuff/bin/hwautocfg @@ -131,13 +131,26 @@ if [ -s /etc/hwinfo.disk ] ; then part44=yes break done - # put detected linux partitions into /etc/fstab with "noauto" - for hdpartnr in $(cat /etc/disk.partition | \ - sed -n -e "/ 83 /p"|sed -e "s/[[:space:]].*//") ; do - mkdir -p /mnt/media/${hdpartnr#/dev/*} 2>/dev/null - echo -e "$hdpartnr\t/media/${hdpartnr#/dev/*}\tauto\t\tnoauto,\ + # put detected linux partitions (83) into /etc/fstab with "noauto", + # special partition 45 (persistent scratch) to /var/scratch and 46 + # to /var/openslx + for partid in 83 45 46 ; do + for hdpartnr in $(cat /etc/disk.partition | \ + sed -n -e "/ ${partid} /p"|sed -e "s/[[:space:]].*//") ; do + mkdir -p /mnt/media/${hdpartnr#/dev/*} 2>/dev/null + if [ ${partid} -eq 83 ] ; then + echo -e "$hdpartnr\t/media/${hdpartnr#/dev/*}\tauto\t\tnoauto,\ noexec\t 0 0" >>/tmp/fstab - done + elif [ ${partid} -eq 45 ] ; then + # if more than one id45 present, the latter ones are simply mounted + # over the previous + ln -sf /mnt/media/${hdpartnr#/dev/*} /mnt/var/scratch + elif [ ${partid} -eq 46 ] ; then + # mount a home directory to (/mnt)/var/home + ln -sf /mnt/media/${hdpartnr#/dev/*} /mnt/var/home + fi + done + done done # determine if tmp preparation should wait for format/mount or not [ -z "$part44" ] && echo "finished at $(sysup)" >/tmp/tmpready -- cgit v1.2.3-55-g7522