From 49c82aea20869a9eff2beb795c2b3505765c1808 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Thu, 15 Mar 2007 20:57:46 +0100 Subject: [PATCH] Run the mount command inside config_fstab only if "$NOSWAP" is not set --- autoconfig.functions | 35 +++++++++++++++++------------------ debian/changelog | 2 ++ 2 files changed, 19 insertions(+), 18 deletions(-) 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 diff --git a/debian/changelog b/debian/changelog index 89eff8e..a6ff228 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ grml-autoconfig (0.6.16) unstable; urgency=low * Execute config_homedir() only if home-bootoption is set. + * Run the mount command inside config_fstab only if "$NOSWAP" + is not set. -- Michael Prokop Fri, 9 Mar 2007 15:08:25 +0100 -- 2.1.4