diff options
author | Dirk von Suchodoletz | 2007-08-01 19:49:08 +0200 |
---|---|---|
committer | Dirk von Suchodoletz | 2007-08-01 19:49:08 +0200 |
commit | d36c9c8ff53ee755f5367134fcd3cffaef9cf615 (patch) | |
tree | e1066ad1f178f70180a86a7b0b3108c8e5bbf8ca /initramfs | |
parent | postinit.local should be set executable (was automatically done with (diff) | |
download | core-d36c9c8ff53ee755f5367134fcd3cffaef9cf615.tar.gz core-d36c9c8ff53ee755f5367134fcd3cffaef9cf615.tar.xz core-d36c9c8ff53ee755f5367134fcd3cffaef9cf615.zip |
Allow local device source for vmware/virt.machine stuff too. Removed
deprecated $imgsrv variable ...
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1300 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs')
-rwxr-xr-x | initramfs/initrd-stuff/bin/servconfig | 26 | ||||
-rw-r--r-- | initramfs/initrd-stuff/etc/messages | 2 |
2 files changed, 14 insertions, 14 deletions
diff --git a/initramfs/initrd-stuff/bin/servconfig b/initramfs/initrd-stuff/bin/servconfig index c854ac4f..cbb3e331 100755 --- a/initramfs/initrd-stuff/bin/servconfig +++ b/initramfs/initrd-stuff/bin/servconfig @@ -117,13 +117,7 @@ if [ "x$vmware" != "x" ] && [ "x$vmware" != "xno" ] ; then pool=default fi # get source of vmware image server (get type, server and path) - if [ -n "${imgsrv}" ] ; then - vmimgprot=$(uri_token $imgsrv prot) - vmimgserv=$(uri_token $imgsrv server) - vmimgpath="$(uri_token $imgsrv path)" - # on DHCP config systems vmware image server might be coded into the - # $vmware variable - elif strinstr "/" "$vmware" ; then + if strinstr "/" "$vmware" ; then vmimgprot=$(uri_token $vmware prot) vmimgserv=$(uri_token $vmware server) vmimgpath="$(uri_token $vmware path)" @@ -133,13 +127,17 @@ if [ "x$vmware" != "x" ] && [ "x$vmware" != "xno" ] ; then case "${vmimgsprot}" in *nbd) ;; + file) + # we expect the stuff on toplevel directory + mount -o ro /dev/${vmimgserv} /mnt/var/lib/vmware || error "$scfg_evmlm" + ;; *) - # we expect nfs mounts here ... - for proto in tcp udp fail; do - [ $proto = "fail" ] && { error "$scfg_nfs" nonfatal; noimg=yes; break;} - mount -n -t nfs -o ro,nolock,$proto ${vmimgserv}:${vmimgpath} \ - /mnt/var/lib/vmware && break - done + # we expect nfs mounts here ... + for proto in tcp udp fail; do + [ $proto = "fail" ] && { error "$scfg_nfs" nonfatal; noimg=yes; break;} + mount -n -t nfs -o ro,nolock,$proto ${vmimgserv}:${vmimgpath} \ + /mnt/var/lib/vmware && break + done ;; esac # if only the path is given expect a local source within exported @@ -244,7 +242,7 @@ if [ "x$automnt" != "xno" ] ; then /misc\t#/etc/auto.misc" >/mnt/etc/auto.master echo -e "# /etc/auto.misc - file generated by $0:\nautomount for \ removable devices is mostly deprecated, so /misc is not\nactivated in \ -auto.master." > /mnt/etc/auto.misc +auto.master." >/mnt/etc/auto.misc fi if [ -n "${automnt_src}" ] ; then # local directory and home directory server from machine-setup diff --git a/initramfs/initrd-stuff/etc/messages b/initramfs/initrd-stuff/etc/messages index b469ca55..f44d0124 100644 --- a/initramfs/initrd-stuff/etc/messages +++ b/initramfs/initrd-stuff/etc/messages @@ -177,6 +177,8 @@ Please add\n them to your stage1 to have them enabled." scfg_nfs=" Mount of some NFS source failed ..." scfg_ntptz=" No such timezone data file (needed for ntp time service \ configuration)." +scfg_evmlm=" Mounting of local device source for vmware directory failed \ +for some reason." scfg_vmdir=" For some reason the runvmware script is not available for \ copying. That\n could be the result of failed mount or simply missing \ file on\n server." |