summaryrefslogtreecommitdiffstats
path: root/initramfs/stage3-stuff/bin/hwautocfg
diff options
context:
space:
mode:
authorDirk von Suchodoletz2009-07-16 18:56:05 +0200
committerDirk von Suchodoletz2009-07-16 18:56:05 +0200
commit7f6936be59bc10253327a37c24b3e0a4df9f1c22 (patch)
tree5c83067309b0dd93f6197ee69138a92ea483d851 /initramfs/stage3-stuff/bin/hwautocfg
parentProper (single) packet selection for installation (untested) ... (diff)
downloadcore-7f6936be59bc10253327a37c24b3e0a4df9f1c22.tar.gz
core-7f6936be59bc10253327a37c24b3e0a4df9f1c22.tar.xz
core-7f6936be59bc10253327a37c24b3e0a4df9f1c22.zip
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
Diffstat (limited to 'initramfs/stage3-stuff/bin/hwautocfg')
-rwxr-xr-xinitramfs/stage3-stuff/bin/hwautocfg25
1 files changed, 19 insertions, 6 deletions
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