]> err.no Git - util-linux/commitdiff
rules: Install udev rules into /lib/udev/rules.d
authorScott James Remnant <scott@ubuntu.com>
Tue, 14 Jul 2009 16:52:52 +0000 (17:52 +0100)
committerScott James Remnant <scott@ubuntu.com>
Tue, 14 Jul 2009 16:52:52 +0000 (17:52 +0100)
Unconditionally install the udev rules, moving them on upgrade
from /etc to /lib if necessary

debian/README.Debian.hwclock
debian/rules
debian/util-linux.dirs
debian/util-linux.preinst [new file with mode: 0644]

index d3ac5cea8725846770e48364209c72a2510d2ae1..c8b840cbe4e256e274cedc1d88549e79a07c50ee 100644 (file)
@@ -1,7 +1,10 @@
 hwclock and Debian:
 
-A Debian installation will, by default, call hwclock --hctosys during system
-startup and hwclock --systohc during system shutdown.
+When udev is running, hwclock -systz will be called when the RTC clock
+device is created.  When udev is not running, hwclock --hctosys will be
+called during system startup.
+
+In both cases, hwclock --systohc will be called during system shutdown.
 
 To set the date/time of the system, just use the standard UNIX date facilities
 (such as date) or any of the advanced timekeeping utilities (ntp, ntpdate,
index 5c3d3d29527b8af6d386b7dd3fd28a908bbc4711..589107365668ef32013304d7ebd6007386dba84c 100755 (executable)
@@ -36,9 +36,6 @@ CONFOPTS= --enable-raw --enable-rdev --enable-partx --with-slang
 ifeq ($(DEB_HOST_ARCH_OS),linux)
 CONFOPTS += --with-selinux
 endif
-ifneq ($(DISTRO),Debian)
-CONFOPTS += --with-fsprobe=volume_id 
-endif
 
 build: build-stamp
 build-stamp:
@@ -110,11 +107,9 @@ endif
                -e '/Default-Start:/a# Default-Stop:' -e '/Default-Stop:/d' \
                debian/util-linux/etc/init.d/hwclockfirst.sh; \
        fi
-ifneq ($(DISTRO),Debian)
        if [ -f debian/util-linux/sbin/hwclock ] ; then \
            install -m 644 debian/hwclock.rules debian/util-linux/lib/udev/rules.d/85-hwclock.rules; \
        fi
-endif
        cd debian; if [ -f util-linux/sbin/fdisk ]; then \
            ln util-linux/sbin/*fdisk fdisk-udeb/usr/sbin/; \
            S=fdisk-udeb/usr/sbin/cfdisk; if [ -f $$S ]; then mv $$S cfdisk-udeb/usr/sbin/; fi; \
index db07a87b0b41edc25558cb2f3c086c96d858ebf0..16ef4dd17102a3d9dc3ea0bae970255fa19c7492 100644 (file)
@@ -2,8 +2,6 @@ bin/
 sbin/
 etc/
 etc/init.d/
-etc/udev/
-etc/udev/rules.d/
 usr/
 usr/bin/
 usr/sbin/
@@ -22,3 +20,4 @@ usr/share/lintian/
 usr/share/lintian/overrides/
 lib/
 lib/udev/
+lib/udev/rules.d/
diff --git a/debian/util-linux.preinst b/debian/util-linux.preinst
new file mode 100644 (file)
index 0000000..a6a6527
--- /dev/null
@@ -0,0 +1,15 @@
+#! /bin/sh
+
+set -e
+
+if [ "$1" = install ] || [ "$1" = upgrade ]; then
+       if [ -e "/etc/udev/rules.d/85-hwclock.rules" ]; then
+               if [ "`md5sum \"/etc/udev/rules.d/85-hwclock.rules\" | sed -e \"s/ .*//\"`" = \
+                    "`dpkg-query -W -f='${Conffiles}' util-linux | sed -n -e \"\\\\' /etc/udev/rules.d/85-hwclock.rules's/.* //p\"`" ]
+               then
+                       rm -f "/etc/udev/rules.d/85-hwclock.rules"
+               fi
+       fi
+fi
+
+#DEBHELPER#