diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-11-19 00:56:32 +0100 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-11-24 11:00:44 +0100 |
commit | ea655984fc22b95793a7d09671fc699083dc4238 (patch) | |
tree | 79c4355423ca34aa3eabe9f3d8b65c3b85ad3d50 | |
parent | 4f652a8ed66a3c8cef89170f9845fbd1cc02296a (diff) | |
download | drakx-net-ea655984fc22b95793a7d09671fc699083dc4238.tar drakx-net-ea655984fc22b95793a7d09671fc699083dc4238.tar.gz drakx-net-ea655984fc22b95793a7d09671fc699083dc4238.tar.bz2 drakx-net-ea655984fc22b95793a7d09671fc699083dc4238.tar.xz drakx-net-ea655984fc22b95793a7d09671fc699083dc4238.zip |
fix various "undefined value for mandatory argument..."
-rwxr-xr-x | bin/drakinvictus | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/drakinvictus b/bin/drakinvictus index eaf6fe1..1df1ced 100755 --- a/bin/drakinvictus +++ b/bin/drakinvictus @@ -47,18 +47,18 @@ my $invictus = {}; network::invictus::read_config($invictus); my %interface_addresses = map { $_ => { - real_address => gtknew('Entry', text => $invictus->{ucarp}{$_}{SRCIP}), - virtual_address => gtknew('Entry', text => $invictus->{ucarp}{$_}{VIRTIP}), - vid => do { my $w = gtknew('Entry', text => $invictus->{ucarp}{$_}{VHID}); $w->set_width_chars(5); $w }, + real_address => gtknew('Entry', text => $invictus->{ucarp}{$_}{SRCIP} || ''), + virtual_address => gtknew('Entry', text => $invictus->{ucarp}{$_}{VIRTIP} || ''), + vid => do { my $w = gtknew('Entry', text => $invictus->{ucarp}{$_}{VHID} || ''); $w->set_width_chars(5); $w }, } } @interfaces; my $master_checkbutton = gtknew('CheckButton', text => N("Start as master"), active => do { my $m = find { $_->{TAKEOVER} } values %{$invictus->{ucarp}}; - $m && text2bool($m->{TAKEOVER}); + $m ? text2bool($m->{TAKEOVER}) : 0; }); my $password_entry = gtknew('Entry', text => do { my $p = find { $_->{PASSWORD} } values %{$invictus->{ucarp}}; - $p && $p->{PASSWORD}; + $p ? $p->{PASSWORD} : ''; }); $password_entry->set_visibility(0); my $ct_sync_interface_list; |