Age | Commit message (Collapse) | Author |
|
|
|
|
|
Earlier commit d8922b367e5d45dc8bb2b5dfba59d9473c3403e8 broke
isChanged.
|
|
|
|
|
|
No need for if (-d node) { return ...
can just use use return ( -d node )
|
|
exists returns a boolean so no need to explicitly check for
defined.
|
|
Global file handles are trap waiting to happen.
|
|
When returning boolean no need to have
if (expr) return 1; else return 0
Also the proper boolean for false is undef not 0.
|
|
|
|
Using three argument open is safer against global handle clash,
and accidental scripting.
|
|
Save is broken by this, so do in smaller chunks.
|
|
Make this code pass perl critic. Mostly by changing it to return
proper booleans, and use three argument open.
|
|
Get rid of these:
"return" statement with explicit "undef" at line 333, column 27. See page 199 of PBP. (Severity: 5)
"return" statement with explicit "undef" at line 335, column 35. See page 199 of PBP. (Severity: 5)
"return" statement with explicit "undef" at line 366, column 2. See page 199 of PBP. (Severity: 5)
|
|
Eliminate warnings about 2 arg open, and non stricture.
|
|
Minor fix:
Code before strictures are enabled at line 31, column 1.
See page 429 of PBP. (Severity: 5)
|
|
The map function operates on an alias of the passed list, so any
modification of the elements has bad side effects. Make an explicit
copy instead:
Original warning:
Don't modify $_ in list functions at line 410, column 17.
See page 114 of PBP. (Severity: 5)
|
|
Fix the easy perlcritc warning about explicit return undef,
and use strict
|
|
|
|
Use standard getprotoent() rather than manual parsing.
Fix perlcritic warnings.
|
|
|
|
fix bug in conversion to Vyatta::Interface by rewriting/refactoring.
|
|
Handle requests for interfaces of a specific type
|
|
Only get address once, and don't call new() directly, use in OO style.
|
|
This routine is used by DHCP server and needs to ignore IPV6
addresses.
NB: Does not fix bogus spellung.
|
|
Use new Vyatta::Interface and sysfs to avoid using ifconfig
and ip command unnecessarily.
|
|
Unify all code that does name -> interface attribute translation
into one place. No need to pass interface path to scripts, and handle
addresses correctly in DHCP code. Use 'undef' consitently for false
in perl code.
|
|
Use regex to identify legal IPV4 address, and get rid of perlcrtic
warnings.
|
|
Rather than reading /etc/services directly, use the standard
getservbyname function. This should be more efficient (uses dbm),
and will work with other nameservices
|
|
Provide generic module to map interface name to configuration
and other attributes. This is first step to ripping the special
case code out of DHCP, QoS, ... that all have own rules for mapping
name to configuration and configuration to name.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
I wanted to use Vyatta::Config::Output, but the perl part of the
autoconf installer is to stupid to handle directory trees, so had
to limit it to one directory per package. So name should have
been Vyatta::ConfigOutput...
|
|
Use hierarchal directory structure
|