[Pkg-utopia-commits] r36 - packages/hal/trunk/debian

Sjoerd Simons sjoerd@haydn.debian.org
Tue, 19 Oct 2004 05:42:02 -0600


Author: sjoerd
Date: 2004-10-19 05:41:54 -0600 (Tue, 19 Oct 2004)
New Revision: 36

Removed:
   packages/hal/trunk/debian/fstab-update.hal
Modified:
   packages/hal/trunk/debian/README.Debian
   packages/hal/trunk/debian/changelog
   packages/hal/trunk/debian/rules
Log:
Stop shipping fstab-update.{sh,hal}

Modified: packages/hal/trunk/debian/README.Debian
===================================================================
--- packages/hal/trunk/debian/README.Debian	2004-10-19 11:33:16 UTC (rev 35)
+++ packages/hal/trunk/debian/README.Debian	2004-10-19 11:41:54 UTC (rev 36)
@@ -2,16 +2,11 @@
  Managing your mountpoints via HAL:
  ----------------------------------
 
-HAL includes two programs which can manage your mount-points in /etc/fstab.
-There is an example shell script in /etc/hal/device.d called fstab-update.hal
-and a program called /usr/sbin/fstab-sync. For system where this is enabled for
-the first time fstab-sync is recommended.
+HAL includes fstab-sync which can manage your mount-points in /etc/fstab.
 
-Beware: these programs can damage your fstab, which would render your system
+Beware: fstab-sync can damage your fstab, which would render your system
 unusable. Therefore, it is disabled by default.
 To enable automatic mount point handling, do:  
 'ln -s /usr/sbin/fstab-sync /etc/hal/device.d/fstab-sync.hal'
-or if you prefer the script:
-'chmod +x /etc/hal/device.d/fstab-update.hal' 
 
  -- Sjoerd Simons <sjoerd@debian.org>

Modified: packages/hal/trunk/debian/changelog
===================================================================
--- packages/hal/trunk/debian/changelog	2004-10-19 11:33:16 UTC (rev 35)
+++ packages/hal/trunk/debian/changelog	2004-10-19 11:41:54 UTC (rev 36)
@@ -20,6 +20,7 @@
        - haldb-require-privs.patch
        - libgphoto2-usermap.patch
        - netlink_spoofing.patch
+     + No longer shipping the fstab-update script
      + debian/hal.preinst: Stop hal in preinst instead of dbus
      + debian/hal.preinst: Add missing debhelper token
      + debian/hal.preinst: Remove fstab-update.h transition.

Deleted: packages/hal/trunk/debian/fstab-update.hal
===================================================================
--- packages/hal/trunk/debian/fstab-update.hal	2004-10-19 11:33:16 UTC (rev 35)
+++ packages/hal/trunk/debian/fstab-update.hal	2004-10-19 11:41:54 UTC (rev 36)
@@ -1,121 +0,0 @@
-#!/bin/sh
-#
-# This shell script updates your /etc/fstab when volumes when they
-# appear and disappear from HAL.
-#
-# ** WARNING **
-# This file is for informational purposes only and as an example
-# of how one might write a HAL callout script.  There are no
-# 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 test "$HAL_PROP_BLOCK_DEVICE" = ""; then
-    exit 0
-fi
-
-if test "$HAL_PROP_BLOCK_MAJOR" = ""; then
-    echo "no device major number"
-    exit 0
-fi
-
-if test "$HAL_PROP_BLOCK_MINOR" = ""; then
-    echo "no device minor number"
-    exit 0
-fi
-
-if test "$HAL_PROP_BLOCK_NO_PARTITIONS" != "true"; then
-    if test "$HAL_PROP_BLOCK_IS_VOLUME" != "true"; then
-	echo "not a volume"
-	exit 0
-    fi
-else
-    if test "$HAL_PROP_BLOCK_IS_VOLUME" = "true"; then
-	echo "volume, but on a block.no_partition device"
-	exit 0
-    fi
-fi
-
-# 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="/media"
-if [ -d /mnt ] && [ ! -d /media ]; then
-    MEDIAROOT="/mnt"
-fi
-
-MOUNTPOINT="$MEDIAROOT/hal/disk-$HAL_PROP_BLOCK_MAJOR-$HAL_PROP_BLOCK_MINOR-"
-
-have_lock=false
-max_loops=10
-loop_times=0
-
-while [ $have_lock = false ] && [ $loop_times -lt $max_loops ]; do
-    loop_times=$(($loop_times+1))
-
-    if [ -n /etc/fstab-lock ]; then
-	echo "$$" >> /etc/fstab-lock
-    fi
-
-    if [ "`head -n 1 /etc/fstab-lock`" = "$$" ]; then
-	have_lock=true
-    else
-	echo "waiting for fstab lock... ($HAL_PROP_BLOCK_DEVICE: $loop_times of $max_loops)"
-	sleep 1
-    fi
-done
-
-# Took too long!
-if [ $loop_times -eq $max_loops ]; then
-    echo "couldn't get lock after $max_loops seconds.  bailing out!"
-    exit 1
-fi
-
-if test "$1" = "add"; then
-
-    if [ ! -d $MOUNTPOINT ]; then
-	mkdir -p $MOUNTPOINT
-    fi
-
-    # Add the device to fstab if it's not already there.
-    grep "^$HAL_PROP_BLOCK_DEVICE" /etc/fstab > /dev/null
-    if [ $? -ne 0 ]; then
-        cp /etc/fstab /etc/fstab-hal
-        printf "$HAL_PROP_BLOCK_DEVICE\t" >> /etc/fstab-hal
-        printf "$MOUNTPOINT\t" >> /etc/fstab-hal
-        # HAL might have autodetected the filesystem type for us - in that
-        # case use it...
-	if test $HAL_PROP_VOLUME_FSTYPE; then
-	    if test $HAL_PROP_VOLUME_FSTYPE = "msdos"; then
-        printf "vfat\t" >> /etc/fstab-hal
-	    else
-        printf "$HAL_PROP_VOLUME_FSTYPE\t" >> /etc/fstab-hal
-	    fi
-	else
-    printf "auto\t" >> /etc/fstab-hal
-	fi
-  printf  "noauto,user,exec 0 0\n" >> /etc/fstab-hal
-
-        # Make sure it's here
-        if [ -f /etc/fstab-hal ] && [ -s /etc/fstab-hal ]; then
-            mv -f /etc/fstab-hal /etc/fstab
-        fi
-    fi
-
-elif test "$1" = "remove"; then
-    grep -v "$MOUNTPOINT" /etc/fstab > /etc/fstab-hal
-
-    # Make sure it's here
-    if [ -f /etc/fstab-hal ] && [ -s /etc/fstab-hal ]; then
-	mv -f /etc/fstab-hal /etc/fstab
-    fi
-
-    if [ -d $MOUNTPOINT ]; then
-	rmdir $MOUNTPOINT
-    fi
-
-else
-    echo "invalid action!"
-fi
-
-rm -f /etc/fstab-lock

Modified: packages/hal/trunk/debian/rules
===================================================================
--- packages/hal/trunk/debian/rules	2004-10-19 11:33:16 UTC (rev 35)
+++ packages/hal/trunk/debian/rules	2004-10-19 11:41:54 UTC (rev 36)
@@ -15,9 +15,6 @@
 	dh_python -phal-device-manager
 
 common-install-impl::
-	# adding example callout script
-	# disable it by default by making it -x
-	install -m 644 debian/fstab-update.hal $(DEB_DESTDIR)/etc/hal/device.d
 	# start/stop hal together with dbus
 	install -d $(DEB_DESTDIR)/etc/dbus-1/event.d
 	install -m 755 debian/hal.init.dbus \