From: Scott James Remnant Date: Tue, 14 Jul 2009 16:52:52 +0000 (+0100) Subject: rules: Install udev rules into /lib/udev/rules.d X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0419e06bbce052deb50f6fb2c769df9beeda6aa2;p=util-linux rules: Install udev rules into /lib/udev/rules.d Unconditionally install the udev rules, moving them on upgrade from /etc to /lib if necessary --- diff --git a/debian/README.Debian.hwclock b/debian/README.Debian.hwclock index d3ac5cea..c8b840cb 100644 --- a/debian/README.Debian.hwclock +++ b/debian/README.Debian.hwclock @@ -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, diff --git a/debian/rules b/debian/rules index 5c3d3d29..58910736 100755 --- a/debian/rules +++ b/debian/rules @@ -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; \ diff --git a/debian/util-linux.dirs b/debian/util-linux.dirs index db07a87b..16ef4dd1 100644 --- a/debian/util-linux.dirs +++ b/debian/util-linux.dirs @@ -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 index 00000000..a6a6527e --- /dev/null +++ b/debian/util-linux.preinst @@ -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#