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

This is a discussion on Bug#449292: clock-setup: finish-install script is confusing and possibly broken - Debian ; 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 ...

+ Reply to Thread
Results 1 to 3 of 3

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

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

    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

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)

    iD8DBQBHLh8Hgm/Kwh6ICoQRAqOSAKDMF/91VNOO12/mz8LU8i5PR/tjgQCfbEqn
    a7kHg5LHG2qARgMqRIaNQ8c=
    =IS85
    -----END PGP SIGNATURE-----


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

    Frans Pop wrote:
    > > # XXX This won't be needed once a new udev that handlesthe
    > > # 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

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)

    iD8DBQFHLjgZd8HHehbQuO8RAinWAKCQMWta1wHpErCAFcJ9m9 TVAvAhUACeO9LH
    mrMtBRWY2f8Eiy+dyAALgN4=
    =Ydca
    -----END PGP SIGNATURE-----


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

    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.

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)

    iD8DBQBHMgbVgm/Kwh6ICoQRAgVGAJ9xxKrAVFD9PuzqqSHmiKvMYPLqqQCgzWIf
    /AMtzrPrat8rzit7yuCXGCM=
    =xAYX
    -----END PGP SIGNATURE-----


+ Reply to Thread