Hello community, here is the log from the commit of package nut checked in at Tue Apr 25 21:55:53 CEST 2006. -------- --- nut/nut.changes 2006-03-24 13:56:24.000000000 +0100 +++ STABLE/nut/nut.changes 2006-04-25 19:16:43.000000000 +0200 @@ -1,0 +2,5 @@ +Tue Apr 25 19:16:15 CEST 2006 - sbrabec@suse.cz + +- Fixed init script to behave correctly for port = auto (#168611). + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nut.spec ++++++ --- /var/tmp/diff_new_pack.OI2QS8/_old 2006-04-25 21:55:36.000000000 +0200 +++ /var/tmp/diff_new_pack.OI2QS8/_new 2006-04-25 21:55:36.000000000 +0200 @@ -18,7 +18,7 @@ License: GPL Group: Hardware/UPS Provides: smartups -Requires: /usr/bin/pgrep /usr/bin/pkill /usr/bin/grep /usr/bin/fgrep +Requires: /usr/bin/pgrep /usr/bin/pkill /usr/bin/grep /usr/bin/fgrep /usr/sbin/lsusb %if %suse_version > 1000 Requires: powersave %endif @@ -27,7 +27,7 @@ Autoreqprov: on Summary: UPS Monitoring Software Version: 2.0.3 -Release: 9 +Release: 14 URL: http://www.networkupstools.org/ Source: %{name}-%{version}.tar.bz2 Source1: upsd.init @@ -100,7 +100,11 @@ %if %suse_version > 1000 %patch4 %endif -sed -i s/@UPSD_USER@/%USER/ upsd.init conf/upsmon.conf +USB_IDS=$(sed -n <scripts/hotplug-ng/nut-usbups.rules.in 's/^SYSFS{idVendor}=="([0-9a-f]*)", SYSFS{idProduct}=="([0-9a-f]*)".*$/\1:\2/p' | tr '\n' '#' | sed 's/#$//;s/#/\\|/g') +if test -z "$USB_IDS" ; then + echo "Format of scripts/hotplug-ng/nut-usbups.rules.in changed. Please fix %%setup." +fi +sed -i "s/@UPSD_USER@/%USER/;s/@USB_IDS@/$USB_IDS/" upsd.init conf/upsmon.conf %build %if "%suse_version" == "910" @@ -244,6 +248,8 @@ %attr(700,%{USER},root) %STATEPATH %changelog -n nut +* Tue Apr 25 2006 - sbrabec@suse.cz +- Fixed init script to behave correctly for port = auto (#168611). * Fri Mar 24 2006 - sbrabec@suse.cz - Typo fixes. * Tue Mar 21 2006 - sbrabec@suse.cz ++++++ upsd.init ++++++ --- nut/upsd.init 2006-03-20 16:52:26.000000000 +0100 +++ STABLE/nut/upsd.init 2006-04-25 19:30:47.000000000 +0200 @@ -151,6 +151,13 @@ PORTS=$(sed -n 's/^[[:space:]][[:space:]]*port[[:space:]]*=[[:space:]]*//p' < $UPS_CONFIG) ## Change permissions of devices. for PORT in $PORTS ; do + if test "$PORT" = auto ; then + PORT=$(LANG=C LC_ALL=C lsusb | grep '(@USB_IDS@)' | sed 's:^:/dev/bus/usb/:;s/Bus //;s/ Device ///;s/: .*//') + if test -z "$PORT" ; then + echo -n "$0: no device for "port = auto" in $UPS_CONFIG" + rc_failed 1 ; rc_status -v ; rc_exit + fi + fi if test -n "$PORT" && test -c "$PORT" ; then chown $UPS_OWNER $PORT || { rc_failed ; rc_status -v ; rc_exit ; } else ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...