X-Git-Url: https://git.grml.org/?a=blobdiff_plain;ds=sidebyside;f=autoconfig.functions;h=fd4b1215e27eac7315f34fd9572678ec09b72451;hb=5e1cd3f650a3562ffc5d49a576cccad2b2ac14a0;hp=35bffaa80915702f54f435c1d31f4cbe17d056c5;hpb=bc6656c8a62d5b89aad347ebed4c81cc14e8cbdd;p=grml-autoconfig.git diff --git a/autoconfig.functions b/autoconfig.functions index 35bffaa..fd4b121 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -1,7 +1,7 @@ #!/bin/zsh # Filename: autoconfig.functions # Purpose: basic system configuration and hardware setup for grml system -# Authors: grml-team (grml.org), (c) Klaus Knopper , (c) Michael Prokop +# Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. ################################################################################ @@ -107,7 +107,7 @@ mount_sys(){ } # }}} -# {{{ Check if we are running from the grml-CD or HD +# {{{ Check if we are running in live mode or from HD INSTALLED="" [ -e /etc/grml_cd ] || INSTALLED="yes" @@ -1887,7 +1887,7 @@ EOF fi else - eerror "We are not running from CD - startx will not work, skipping it." + eerror "We are not running in live mode - startx will not work, skipping it." eerror " -> Please use something like xdm, gdm or kdm for starting X on a harddisk system!" ; eend 1 fi else @@ -1946,7 +1946,7 @@ else else [ -d /mnt/grml ] || mkdir /mnt/grml umount /mnt/grml 1>>$DEBUG 2>&1 # make sure it is not mounted - mount -o ro -t auto $MOUNTDEVICE /mnt/grml ; RC="$?" + mount -o ro -t auto $DCSDEVICE /mnt/grml ; RC="$?" if [[ $RC == 0 ]]; then einfo "Successfully mounted $DCSDEVICE to /mnt/grml (readonly)." ; eend 0 eindent @@ -1956,10 +1956,11 @@ else fi fi fi + if [ -n "$DCSDIR" ]; then einfo "Debs, config, scripts will be read from $DCSDIR." ; eend 0 else - einfo "Debs, config, scripts will be read from the CD image directly." ; eend 0 + einfo "Debs, config, scripts will be read from the live image directly." ; eend 0 fi } @@ -2340,7 +2341,7 @@ if checkbootparam "debnet" ; then mkdir /etc/network/run umount /mnt ; eend $? einfo "Starting network." - /etc/init.d/networking start ; eend $? + invoke-rc.d networking start ; eend $? else eerror "/etc/network/interfaces not found." ; eend 1 fi @@ -2391,9 +2392,9 @@ config_tohd() fi if grep -q $TARGET /proc/mounts ; then - eerror "$TARGET already mounted, skipping execution of tohd therefore." - eend 1 - return 1 + eerror "$TARGET already mounted, skipping execution of tohd therefore." + eend 1 + return 1 fi local MOUNTDIR=$(mktemp -d) @@ -2401,10 +2402,10 @@ config_tohd() if mount -o rw "$TARGET" "$MOUNTDIR" ; then einfo "Copyring live system to $TARGET - this might take a while" rsync -a --progress /live/image/live $MOUNTDIR - sync - umount "$MOUNTDIR" + sync + umount "$MOUNTDIR" eend $? - einfo "Booting with \"grml bootfrom=$TARGET\" should work now." ; eend 0 + einfo "Booting with \"grml bootfrom=$TARGET\" should work now." ; eend 0 else eerror "Error when trying to mount $TARGET, sorry."; eend 1 return 1