hal/tools/callouts fstab-update.sh,1.9,1.10

Joe Shaw joe at pdx.freedesktop.org
Tue May 18 14:14:47 PDT 2004


Update of /cvs/hal/hal/tools/callouts
In directory pdx:/tmp/cvs-serv25642/tools/callouts

Modified Files:
	fstab-update.sh 
Log Message:
2004-05-18  Joe shaw  <joeshaw at novell.com>

	* tools/callouts/fstab-update.sh: Use /media as long as it's there
	and /mnt doesn't exist.  Otherwise fallback to /mnt.  Should
	happily work on all distros.  Patch from Sjoerd Simons
	<sjoerd at luon.net>.

Index: fstab-update.sh
===================================================================
RCS file: /cvs/hal/hal/tools/callouts/fstab-update.sh,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- a/fstab-update.sh	17 May 2004 21:55:50 -0000	1.9
+++ b/fstab-update.sh	18 May 2004 21:14:45 -0000	1.10
@@ -9,10 +9,6 @@
 # guarantees for safety of this script.  If you want to try it
 # out, you should make a backup of your existing /etc/fstab
 # file, and you shouldn't use this on any production system!
-#
-# If you are running SUSE (or another FHS 2.3-compliant OS)
-# you should probably change the MEDIAROOT from "/mnt" to
-# "/media"
 
 if test "$HAL_PROP_BLOCK_DEVICE" = ""; then
     exit 0
@@ -36,7 +32,11 @@
 # NOTE: We could use HAL_PROP_BLOCK_VOLUME_LABEL (which may or may not be 
 # available) but that would be a bad idea since it won't work for two
 # volumes with the same label
-MEDIAROOT="/mnt"
+MEDIAROOT="/media"
+if [ -d /mnt -a ! -d /media ]; then
+    MEDIAROOT="/mnt"
+fi
+
 MOUNTPOINT="$MEDIAROOT/hal/disk-$HAL_PROP_BLOCK_MAJOR-$HAL_PROP_BLOCK_MINOR-"
 
 have_lock=false





More information about the hal-commit mailing list