Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Bug#449292: clock-setup: finish-install script is confusing and possibly broken

From: Frans Pop <elendil(at)planet.nl>
Date: Sun Nov 04 2007 - 14:35:35 EST


Package: clock-setup
Version: 0.93

After the last few (not yet uploaded) commits, part of the finish-install script looks like this:

> # This may not be necessary; hwclock can do direct IO if
> # the rtc module is not loaded.
> log-output -t hw-detect modprobe -v rtc || log "rtc module not loaded"
> log-output -t hw-detect modprobe -v rtc-dev || log "rtc-dev module not loaded"
> update-dev

> machine=$(grep "^Hardware" /proc/cpuinfo | sed 's/Hardware\s*:\s*//')
> case "$machine" in
> "Linksys NSLU2")
> # The nslu2 needs a special driver for the hardware
> # clock.
> update-dev

The comment and update-dev statement should no longer be needed here.

> # This driver creates a rtc0 device, so symlink.
> # XXX This won't be needed once a new udev that handles the
> # symlink gets into Debian.
> if [ -e /dev/rtc0 ]; then
> ln -sf rtc0 /dev/rtc
> fi

If rtc-dev is now a generic driver, shouldn't this symlink be created in all cases (or at least in all cases where rtc-dev was loaded successfully), and not just for NSLU?

> ;;
> esac

Do you need help?X

What happens if both drivers get loaded? Can that happen? Shouldn't it be either one _or_ the other?

Maybe something like:

if log-output -t hw-detect modprobe -v rtc; then

        update-dev
else

	log "rtc module not loaded"
	if log-output -t hw-detect modprobe -v rtc-dev; then
		update-dev
		# create symlink
	else
		log "rtc-dev module not loaded"
	fi

fi

-- 
To UNSUBSCRIBE, email to debian-boot-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Received on Sun Nov 4 14:43:04 2007

This archive was generated by hypermail 2.1.8 : Wed Mar 19 2008 - 03:17:03 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library