Opened 7 years ago

Closed 3 years ago

#9630 closed defect (fixed) does not check $retrieve_prog return code

Reported by: Alexey I. Froloff <raorn@…> Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: packages Version: Trunk
Keywords: ddns-scripts Cc:

Description always thinks that IP update succeeded, regardless of $retrieve_prog return code.

I have turned off "Preffer IPv4" option in busybox and now it fails to update record because 6in4 iface hotplug script (priority 95) executed after ddns (priority 25).

Proposed solution:

--- /usr/lib/ddns/	2011-06-29 12:46:34.322495138 +0400
+++ /usr/lib/ddns/	2011-06-29 12:46:29.349445011 +0400
@@ -289,11 +289,18 @@
 		#here we actually connect, and perform the update
 		update_output=$( $retrieve_prog "$final_url" )
+		rc=$?
 		verbose_echo "Update Output:"
 		verbose_echo "$update_output"
 		verbose_echo ""
+		[ $rc -eq 0 ] || {
+			verbose_echo "update failed, return code is: $rc"
+			sleep 5
+			continue
+		}
 		#save the time of the update

Attachments (0)

Change History (4)

comment:1 Changed 6 years ago by roger@…

I think further changes are necessary, because at the moment registered_ip is always set to current_ip regardless of whether the update succeeded, so it won't make any further attempt to update the ip until the force interval expires.

comment:2 Changed 4 years ago by jow

  • Milestone changed from Backfire 10.03.2 to Chaos Calmer (trunk)

Milestone Backfire 10.03.2 deleted

comment:3 Changed 3 years ago by chris5560

Fixed since ddns-scripts ver. 2.0.0-1

Please close the ticket for me.

comment:4 Changed 3 years ago by nbd

  • Resolution set to fixed
  • Status changed from new to closed

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.