From 98f1f9afb96af2660ea590c4d32c27e0a7887202 Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Thu, 5 Feb 2009 07:57:54 +0100 Subject: [PATCH 1/1] correctly retrieve empty settings --- rsbs2.pl | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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"; -- 2.39.5