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

2007-11-07 Thread Frans Pop
On Sunday 04 November 2007, Joey Hess wrote:
 Frans Pop wrote:
   # 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?

 A new version of udev supports this symlink, I've lost track of which
 one though, not sure if it's in unstable yet.

OK, but that does not really address my other comments.
I've marked clock-setup as not ready in the changelog for now.


signature.asc
Description: This is a digitally signed message part.


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

2007-11-04 Thread Frans Pop
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

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


signature.asc
Description: This is a digitally signed message part.


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

2007-11-04 Thread Joey Hess
Frans Pop wrote:
  # 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?

A new version of udev supports this symlink, I've lost track of which
one though, not sure if it's in unstable yet.

-- 
see shy jo


signature.asc
Description: Digital signature