From: Michael Gernoth Date: Thu, 5 Feb 2009 06:57:54 +0000 (+0100) Subject: correctly retrieve empty settings X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/rsbs2/commitdiff_plain/98f1f9afb96af2660ea590c4d32c27e0a7887202?hp=75085d94afa9ad53ae3ac294af7119712b4789e7 correctly retrieve empty settings --- diff --git a/rsbs2.pl b/rsbs2.pl index 2d7ec2a..a481f45 100755 --- a/rsbs2.pl +++ b/rsbs2.pl @@ -151,7 +151,7 @@ sub _req { $request->content($xml); $response = $ua->request($request); die("Error in request: " . $response->status_line . "\n") unless ($response->is_success); - XMLin($response->content); + XMLin($response->content, SuppressEmpty => ''); } sub _getprop { @@ -492,12 +492,7 @@ if (@sprop) { if ($save ne '') { my @dontsave = qw(ENABLE_LAN_AUTONEG ENABLE_LAN_100 ENABLE_LAN_FDUPLEX GATEWAY IP_ADDRESS NETMASK TFTP_FIRMWARE_FILE TFTP_ADDR_FIRMWARE - ENABLE_DHCP HELP_LOCATION HELP_LOCATION PPP_PORT PPP2_INIT PPP2_PORT - SERVER_ID SNMP_SERVER_1 SNMP_SERVER_2 SNMP_SERVER_3 SNMP_SERVER_4 - SNMP_SERVER_5 SNMP_SERVER_6 SNMP_SERVER_7 SERVER_AD_NAME - SERVER_AD_NAME2 SERVER_AD_NAME3 SERVER_AD_NAME4 SERVER_MAC_ADDRESS - SERVER_MAC_ADDRESS2 SERVER_MAC_ADDRESS3 SERVER_MAC_ADDRESS4 - MAC_ADDRESS LAST_CARD_NAME LAST_ENABLE_DHCP LAST_GATEWAY + ENABLE_DHCP MAC_ADDRESS LAST_CARD_NAME LAST_ENABLE_DHCP LAST_GATEWAY LAST_IP_ADDRESS LAST_NETMASK); open (SAVEFILE, ">${save}") || die "Error opening save-file: $!\n";