From:
[email protected]
On 2004.08.18 10:39, Thomas Hood wrote:
On Tue, 2004-08-17 at 22:31, Miquel van Smoorenburg wrote:
On Tue, 17 Aug 2004 21:41:21, Thomas Hood wrote:
Thanks for pointing out this problem.
Using the "sort" program isn't appropriate because it is located
in /usr/bin/ whereas mountnfs.sh can run when /usr/ isn't yet
mounted. Instead you can use a function like this:
I think a better way is to let mount sort this out.
Letting mount sort it out would be tidier. However, considering
code quality of the mount program, I would be very hesitant about
exercising a new feature of mount at this stage of the release
process.
You're probably right. It wasn't that hard to fix properly, btw.
This should probably go into the proposed-updates upload.
How important is it to fix this bug? If not important then we
can deal with it later in the way you suggest. If it is important
to fix it now then I would vote for the "uniquify" approach.
Your call, of course.
It was not that hard to fix, and I don't think there's something
wrong with the below - it's similar to your proposed solution:
--- /etc/init.d/mountnfs.sh 2004-07-29 12:34:05.000000000 +0200
+++ mountnfs.sh 2004-08-18 11:17:32.000000000 +0200
@@ -7,7 +7,7 @@
# Also mounts SMB filesystems now, so the name of
# this script is getting increasingly inaccurate.
#
-# Version: @(#)mountnfs.sh 2.85-23 29-Jul-2004
[email protected]
+# Version: @(#)mountnfs.sh 2.86-2 18-Aug-2004
[email protected]
#
VERBOSE=yes
@@ -49,12 +49,26 @@
portmap=yes
;;
esac
- NETFS="$NETFS $fstype"
;;
smbfs|cifs|coda|ncp|ncpfs)
- NETFS="$NETFS $fstype"
+ ;;
+ *)
+ fstype=
;;
esac
+ if [ -n "$fstype" ]
+ then
+ case "$NETFS" in
+ $fstype|*,$fstype|$fstype,*|*,$fstype,*)
+ ;;
+ "")
+ NETFS="$fstype"
+ ;;
+ *)
+ NETFS="$NETFS,$fstype"
+ ;;
+ esac
+ fi
done
exec 0>&1
@@ -72,10 +86,7 @@
if [ -n "$NETFS" ]
then
echo "Mounting remote filesystems..."
- for fstype in $NETFS
- do
- mount -a -t $fstype
- done
+ echo mount -a -t$NETFS
fi
) < /