From 22c73e41eb8c42fc17110641c9a995fb85e35ac9 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Tue, 7 Dec 2010 12:15:42 +0100 Subject: [PATCH] debnet: adjust code indenting and error message --- sbin/debnet | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sbin/debnet b/sbin/debnet index 36376f9..683b475 100755 --- a/sbin/debnet +++ b/sbin/debnet @@ -1,9 +1,9 @@ #!/bin/sh -e # Filename: debnet -# Purpose: scan for Debian-style network configs and enables it on the system +# Purpose: scan for Debian-style network configs and enable it on the system # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ -# License: This file is licensed under the GPL v2. +# License: This file is licensed under GPL v2+. ################################################################################ . /etc/grml/lsb-functions @@ -22,17 +22,17 @@ FOUND_DEBNET="" eindent if ! mount | grep '/mnt ' >/dev/null 2>&1 ; then - for i in $DEVICES; do - if mount -o ro -t auto "$i" /mnt >/dev/null 2>&1; then - einfo "Scanning on $i" - if [ -f /mnt/etc/network/interfaces ]; then - einfo "/etc/network/interfaces found on ${i}" ; eend 0 - FOUND_DEBNET="$i" - break - fi - umount /mnt - fi - done + for i in $DEVICES; do + if mount -o ro -t auto "$i" /mnt >/dev/null 2>&1; then + einfo "Scanning on $i" + if [ -f /mnt/etc/network/interfaces ]; then + einfo "/etc/network/interfaces found on ${i}" ; eend 0 + FOUND_DEBNET="$i" + break + fi + umount /mnt + fi + done if [ -n "$FOUND_DEBNET" ]; then einfo "Stopping network." @@ -47,7 +47,7 @@ if ! mount | grep '/mnt ' >/dev/null 2>&1 ; then einfo "Starting network." invoke-rc.d networking start ; eend $? else - eerror "/etc/network/interfaces not found." ; eend 1 + eerror "/etc/network/interfaces not found on external partitions." ; eend 1 fi eoutdent else -- 2.1.4