a bug in dhcp exit hook script of ddclient

Bug #1704159 reported by Dmitry Redkin
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
ddclient (Debian)
Fix Released
Unknown
ddclient (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

the ddclient DHCP exit hook script looks like:

[ -x /usr/sbin/ddclient ] || exit 0
[ -f /etc/default/ddclient ] || exit 0
. /etc/default/ddclient
[ $run_dhclient = "true" ] || exit 0

case $reason in
    BOUND | RENEW | REBIND)
        /usr/bin/logger -t dhclient $reason, updating IP address with ddclient
        /usr/sbin/ddclient -daemon=0 -syslog > /dev/null 2>&1
        ;;
    *)
        ;;
esac

The error is on line 7. As all the shell programming guides say, when checking a variable you have to quote it, or in case the variable is null (as it is in my case) you will get an error:

/sbin/dhclient-script: 7: [: =: unexpected operator

so the correct line 7 for this script is:

[ "$run_dhclient" = "true" ] || exit 0

Please fix it in LTS also as people start to complain on the forums about this bug already.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ddclient (Ubuntu):
status: New → Confirmed
Revision history for this message
Manfred (mejf) wrote :

This bug caused me several hours of headscratching and work. :-(

Revision history for this message
Jani Uusitalo (uusijani) wrote :
Changed in ddclient (Debian):
status: Unknown → New
Changed in ddclient (Debian):
status: New → Fix Released
Richard Hansen (rhansen)
Changed in ddclient (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.