summaryrefslogtreecommitdiffstats
path: root/initramfs/initrd-stuff/etc/functions
diff options
context:
space:
mode:
authorFelix Endres2007-02-26 01:15:41 +0100
committerFelix Endres2007-02-26 01:15:41 +0100
commitfaf067f3761cfd290aa9aa3c69b896175dbaa5f9 (patch)
tree1246522bc750ea8cfbdda8d5ede1fef033f34041 /initramfs/initrd-stuff/etc/functions
parent* some cleanup concerning the error message at the end of the installation (diff)
downloadcore-faf067f3761cfd290aa9aa3c69b896175dbaa5f9.tar.gz
core-faf067f3761cfd290aa9aa3c69b896175dbaa5f9.tar.xz
core-faf067f3761cfd290aa9aa3c69b896175dbaa5f9.zip
First draft of function to stack the root fs from different sources with unionfs
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@720 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs/initrd-stuff/etc/functions')
-rw-r--r--initramfs/initrd-stuff/etc/functions40
1 files changed, 40 insertions, 0 deletions
diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions
index a193fb59..bba03f4a 100644
--- a/initramfs/initrd-stuff/etc/functions
+++ b/initramfs/initrd-stuff/etc/functions
@@ -932,6 +932,46 @@ for i in boot.ld ${D_INITSCRIPTS}; do
#ln -sf /etc${D_INITDIR}/$i /mnt/etc/${D_INITBOOTD}/K${revcnt}$i
done
}
+# This function gets an uri as parameter.
+# It will then try to mount this uri and add it to the union at /
+include_in_fsroot_union () {
+ ROOTFS=$1
+ srvproto=$(uri_token $ROOTFS prot)
+ case $srvproto in
+ nfs)
+ # nfsroot consists now of two different parts
+ root_path=/$(uri_token $ROOTFS path)
+ nfsserver=$(uri_token $ROOTFS server)
+ echo -e "NFS $ROOTFS parsed to $srvproto - $nfsserver - \
+$root_path" >> /tmp/felixtestlog
+ mkdir -p /mnt/tmp/rootunion
+ nfsmnt $nfsserver:$root_path /mnt/tmp/rootunion || error "Fehler beim mounten der zusatzunion (FIXME)"
+ ;;
+ *nbd)
+ nbdmod=$srvproto
+ # get settings for nbd-client, filesystem equals to path in URI
+ # notation
+ nbdhost=$(uri_token $ROOTFS server)
+ nbdport=$(uri_token $ROOTFS port)
+ nbdrfst=$(uri_token $ROOTFS path)
+ echo -e "(D)NBD $ROOTFS parsed to $srvproto - $nbdhost - \
+$nbdport - $nbdrfst" >> /tmp/felixtestlog
+ #FIXME: mount durchführen
+ ;;
+ aoe)
+ echo "Not implemented yet"
+ ;;
+ iscsi)
+ echo "Not implemented yet"
+ #iscsiserver=$(uri_token $ROOTFS server)
+ #iscsiport=$(uri_token $ROOTFS port)
+ #iscsitarget=$(uri_token $ROOTFS path)
+ ;;
+ esac
+ unionctl /mnt/ --add --after 1 --mode ro /mnt/tmp/rootunion
+ bash
+
+}
# kdmrc template started from distro specific functions files
config_kdm_template () {