X-Git-Url: http://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=autoconfig.functions;h=40ad6b3f6ea66b95fd628f8eb11c35005edf8935;hp=e0c6cc572695faf455b649bb37f4943d70a55c88;hb=49c82aea20869a9eff2beb795c2b3505765c1808;hpb=8c0c2938f3f2fd50eae0bd14602036c3194a6e96 diff --git a/autoconfig.functions b/autoconfig.functions index e0c6cc5..40ad6b3 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -1038,9 +1038,11 @@ if [ -n "$partitions" ]; then *) continue ;; # *) NONEFOUND='1'; continue ;; esac - mount -o "$MOUNTOPTS" -t $f $p $m 2>>$DEBUG || continue - # Activate swapfile, if exists - SWAPFILE="$(/bin/ls -1d $m/[Gg][Rr][Mm][Ll].[Ss][Ww][Pp] 2>/dev/null)" + if [ -z "$NOSWAP" ] ; then + mount -o "$MOUNTOPTS" -t $f $p $m 2>>$DEBUG || continue + # Activate swapfile, if exists + SWAPFILE="$(/bin/ls -1d $m/[Gg][Rr][Mm][Ll].[Ss][Ww][Pp] 2>/dev/null)" + fi if [ -z "$NOSWAP" -a -n "$SWAPFILE" -a -f "$SWAPFILE" ]; then mount -o remount,rw $m if swapon "$SWAPFILE" 2>>$DEBUG ; then @@ -1091,22 +1093,19 @@ if checkbootparam "ipv6"; then # we probably need some time until stateless autoconfiguration has happened sleep 2 NETDEVICES="$(awk -F: '/eth.:|tr.:|wlan.:/{print $1}' /proc/net/dev 2>>$DEBUG)" - for DEVICE in `echo "$NETDEVICES"` - do - eindent - einfo "$DEVICE:" - ADDRESSES="$(ifconfig $DEVICE | awk '/.*inet6 addr:.*/{print $3}')" - COUNT="$(ifconfig $DEVICE | awk '/.*inet6 addr:.*/{ sum += 1};END {print sum }')" + for DEVICE in `echo "$NETDEVICES"`; do eindent - for ADDR in `echo "$ADDRESSES"` - do - einfo "$ADDR" - done - if [ "$COUNT" -eq "0" ] - then - einfo "(none)" ; eend 1 - fi - eoutdent + einfo "$DEVICE:" + ADDRESSES="$(ifconfig $DEVICE | awk '/.*inet6 addr:.*/{print $3}')" + COUNT="$(ifconfig $DEVICE | awk '/.*inet6 addr:.*/{ sum += 1};END {print sum }')" + eindent + for ADDR in `echo "$ADDRESSES"` ; do + einfo "$ADDR" + done + if [ "$COUNT" -eq "0" ] ; then + einfo "(none)" ; eend 1 + fi + eoutdent eoutdent done eend 0