--- upsdrv~ 2006-04-14 22:32:37 +0400 +++ upsdrv 2006-04-14 22:47:47 +0400 @@ -18,17 +18,18 @@ get_drvlist() { - DRVLIST="$((find $CHROOTDIR/ -maxdepth 1 -name '*-*.pid' -type f | - sed -ne 's,'$CHROOTDIR'/\([^/-]\+\)-[^/-]\+\.pid$,/lib/nut/\1,p'; +# DRVLIST="$((find $CHROOTDIR/ -maxdepth 1 -name '*-*.pid' -type f | +# sed -ne 's,'$CHROOTDIR'/\([^/-]\+\)-[^/-]\+\.pid$,/lib/nut/\1,p'; + DRVLIST="$((find /var/lib/upsd -maxdepth 1 -name '*-*.pid' -type f | upsdrvctl list 2>/dev/null |grep ^/ ) |sort -u)" } start() { - upsd_configured || return 0 +# upsd_configured || return 0 - action "Starting UPS drivers:" upsdrvctl $UPSDRV_OPTIONS start + action "Starting UPS drivers:" upsdrvctl -u upsdrv start RETVAL=$? [ $RETVAL -eq 0 ] && touch "$LOCKFILE" return $RETVAL