From: LaMont Jones Date: Thu, 19 Jul 2007 02:36:44 +0000 (-0600) Subject: 2.12r-4ubuntu2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a90e6158cbc894d542f911111009243bd4206831;p=util-linux 2.12r-4ubuntu2 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..729240c0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,30 @@ +*~ +*.[ao] +Makefile +aclocal.m4 +autom4te.cache +stamp-h.in +Makefile.in +configure +config.cache +config.h +config.h.in +config.log +config.guess +config.status +config.sub +stamp-h +stamp-h1 +update.log +m4 +aclocal.m4 +ABOUT-NLS +config.rpath +mkinstalldirs +compile +depcomp +install-sh +missing +ltmain.sh +libtool +.deps diff --git a/debian/changelog b/debian/changelog index 4da5d4eb..2bd667f3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +util-linux (2.12r-4ubuntu2) dapper; urgency=low + + * Move init script to S50 so it runs after /usr has definitely been + mounted. + + -- Scott James Remnant Thu, 23 Feb 2006 15:32:56 +0000 + +util-linux (2.12r-4ubuntu1) dapper; urgency=low + + * Take out the duplicate hwclock init scripts, we'll just run this once. + * Make the hwclock script silent and run in the background by default + + -- Scott James Remnant Mon, 30 Jan 2006 14:50:07 +0000 + util-linux (2.12r-4) unstable; urgency=low * Stupid fat-fingers typo. Closes: #348483 diff --git a/debian/conffiles b/debian/conffiles index 6ec76383..fed2b274 100644 --- a/debian/conffiles +++ b/debian/conffiles @@ -1,2 +1 @@ /etc/init.d/hwclock.sh -/etc/init.d/hwclockfirst.sh diff --git a/debian/hwclock.sh b/debian/hwclock.sh index a66055d9..6da58b20 100644 --- a/debian/hwclock.sh +++ b/debian/hwclock.sh @@ -16,10 +16,6 @@ # before changing this file. You risk serious clock # misbehaviour otherwise. -FIRST=no # debian/rules sets this to 'yes' when creating hwclockfirst.sh - -[ "X$FIRST" = "Xyes" ] && AGAIN="" || AGAIN=" again" - # Set this to any options you might need to give to hwclock, such # as machine hardware clock type for Alphas. HWCLOCKPARS= @@ -36,12 +32,6 @@ hwclocksh() case "$UTC" in no|"") GMT="--localtime" UTC="" - if [ "X$FIRST" = "Xyes" ] && [ ! -r /etc/localtime ]; then - if [ -z "$TZ" ]; then - log_action_msg "System clock was not updated at this time" - return 1 - fi - fi ;; yes) GMT="--utc" UTC="--utc" @@ -61,54 +51,41 @@ hwclocksh() echo "0.0 0 0.0" > /etc/adjtime fi - if [ "$FIRST" != yes ]; then - # Uncomment the hwclock --adjust line below if you want - # hwclock to try to correct systematic drift errors in the - # Hardware Clock. - # - # WARNING: If you uncomment this option, you must either make - # sure *nothing* changes the Hardware Clock other than - # hwclock --systohc, or you must delete /etc/adjtime - # every time someone else modifies the Hardware Clock. - # - # Common "vilains" are: ntp, MS Windows, the BIOS Setup - # program. - # - # WARNING: You must remember to invalidate (delete) - # /etc/adjtime if you ever need to set the system clock - # to a very different value and hwclock --adjust is being - # used. - # - # Please read /usr/share/doc/util-linux/README.Debian.hwclock - # before enablig hwclock --adjust. + # Uncomment the hwclock --adjust line below if you want + # hwclock to try to correct systematic drift errors in the + # Hardware Clock. + # + # WARNING: If you uncomment this option, you must either make + # sure *nothing* changes the Hardware Clock other than + # hwclock --systohc, or you must delete /etc/adjtime + # every time someone else modifies the Hardware Clock. + # + # Common "vilains" are: ntp, MS Windows, the BIOS Setup + # program. + # + # WARNING: You must remember to invalidate (delete) + # /etc/adjtime if you ever need to set the system clock + # to a very different value and hwclock --adjust is being + # used. + # + # Please read /usr/share/doc/util-linux/README.Debian.hwclock + # before enablig hwclock --adjust. - #hwclock --adjust $GMT $BADYEAR - : - fi + #hwclock --adjust $GMT $BADYEAR + : if [ "$HWCLOCKACCESS" != no ]; then - log_daemon_msg "Setting the system clock$AGAIN" + [ "$VERBOSE" = no ] || log_daemon_msg "Setting the system clock" # Copies Hardware Clock time to System Clock using the correct # timezone for hardware clocks in local time, and sets kernel # timezone. DO NOT REMOVE. /sbin/hwclock --hctosys $GMT $HWCLOCKPARS $BADYEAR - if [ "$FIRST" = yes ]; then - # Copies Hardware Clock time to System Clock using the correct - # timezone for hardware clocks in local time, and sets kernel - # timezone. DO NOT REMOVE. - if [ -z "$TZ" ]; then - /sbin/hwclock --noadjfile --hctosys $GMT $HWCLOCKPARS $BADYEAR - else - TZ="$TZ" /sbin/hwclock --noadjfile --hctosys $GMT $HWCLOCKPARS $BADYEAR - fi - - if /sbin/hwclock --show $GMT $HWCLOCKPARS $BADYEAR 2>&1 > /dev/null | - grep -q '^The Hardware Clock registers contain values that are either invalid'; then - echo "Invalid system date -- setting to 1/1/2002" - /sbin/hwclock --set --date '1/1/2002 00:00:00' $GMT $HWCLOCKPARS $BADYEAR - fi + if /sbin/hwclock --show $GMT $HWCLOCKPARS $BADYEAR 2>&1 > /dev/null | + grep -q '^The Hardware Clock registers contain values that are either invalid'; then + echo "Invalid system date -- setting to 1/1/2002" + /sbin/hwclock --set --date '1/1/2002 00:00:00' $GMT $HWCLOCKPARS $BADYEAR fi # Announce the local time. @@ -116,12 +93,9 @@ hwclocksh() else verbose_log_action_msg "Not setting System Clock" fi - log_end_msg 0 + [ $VERBOSE = no ] || log_end_msg 0 ;; stop|restart|reload|force-reload) - if [ "X$FIRST" = "Xyes" ]; then - return 0 - fi # # Updates the Hardware Clock with the System Clock time. # This will *override* any changes made to the Hardware Clock. @@ -155,4 +129,4 @@ hwclocksh() esac } -hwclocksh "$@" +hwclocksh "$@" & diff --git a/debian/postinst b/debian/postinst index 27df538f..12d20cf5 100644 --- a/debian/postinst +++ b/debian/postinst @@ -25,10 +25,9 @@ fi if [ "$(uname -s)" = "Linux" ]; then model=$(uname -m) if [ ${model%x} != "s390" ]; then + update-rc.d -f hwclockfirst.sh remove >/dev/null 2>&1 update-rc.d -f hwclock.sh remove 2>/dev/null > /dev/null - update-rc.d hwclock.sh start 22 S . stop 25 0 6 . > /dev/null - update-rc.d -f hwclockfirst.sh remove 2>/dev/null > /dev/null - update-rc.d hwclockfirst.sh start 18 S . > /dev/null + update-rc.d hwclock.sh start 50 S . stop 25 0 6 . > /dev/null fi fi diff --git a/debian/postrm b/debian/postrm index 01d7f2fa..7f555a19 100644 --- a/debian/postrm +++ b/debian/postrm @@ -5,7 +5,6 @@ case "$1" in ;; purge) update-rc.d hwclock.sh remove >/dev/null - update-rc.d hwclockfirst.sh remove >/dev/null ;; *) ;; diff --git a/debian/rules b/debian/rules index 92dc264e..be3629d6 100755 --- a/debian/rules +++ b/debian/rules @@ -61,7 +61,6 @@ clean: unpatch find . -name '*.orig' -print0 | xargs -0r rm find . -name '*.rej' -print0 | xargs -0r rm rm -rf debian/tmp* debian/files* debian/substvars po/messages - rm -f debian/hwclockfirst.sh rm -rf $(CFDISK_PO_DIR) # Architecture independant stuff @@ -75,7 +74,7 @@ SBINFILES = disk-utils/mkswap ifeq ($(DEB_HOST_GNU_SYSTEM),linux-gnu) ifneq ($(arch),$(nohwclock)) -INITFILES = debian/hwclock.sh debian/hwclockfirst.sh +INITFILES = debian/hwclock.sh SBINFILES += hwclock/hwclock endif BINFILES += sys-utils/dmesg @@ -163,9 +162,6 @@ endif install: -debian/hwclockfirst.sh: debian/hwclock.sh - sed '/^FIRST/s/no/yes/; s/hwclock\.sh/hwclockfirst.sh/g' debian/hwclock.sh > debian/hwclockfirst.sh - binary-indep: checkroot build binary-arch $(checkdir) # This assumes non-native, and only one hyphen in the version number.