Age | Commit message (Collapse) | Author |
|
|
|
After migrating PowerDNS to systemd and also its configuration files to a
volatile directory in commit 77d725f ("dns-forwarding: T2185: move configuration
files to volatile /run directory") the path for the control file has not
been altered and pushed to the client rec_control binary"
|
|
allow to setup the debugging from environment variables.
allow to set the name of the file used for logging
change the name of the debug options to be:
- developer: enable pdb of raise
- log: all logging messages are logged to a file
- ifconfig: show on screen action peformed to change intefaces
- command: print all the result of command to screen
also provide a way to setup the debugging using environment
variables.
|
|
|
|
|
|
|
|
Change the code to let stderr passthrough to the screen
as it is the behaviout of os.system and subprocess.call/check_out
The input feature was not working and was fixed
Also always convert '\r\n' to '\n'
|
|
os.system does print the ouput of the command, run() does not.
A new function called call() does the printing and return the error code.
|
|
|
|
airbag: T2186: report friendly user message and log to syslog
|
|
|
|
... to make it clear also directories can be chown(-ed)
|
|
All messages sent to stderr are now logged to syslog.
Also should a raise statement not be handled by the program,
a friendlier message is sent to the user (with the trace to
syslog)
It provide a new debug option: /tmp/vyos.developer.debug
when the file exists and the code raise without being caught up
the program will automatically fall into pdb port-morterm mode
allowing to investigate the reason for the failure
|
|
Interfaces enslaved to a bridge are not allowed to be deleted. If an interface
is deleted from the config but it is still enslaved to a bridge will cause a
configuration error on the subsequent boot.
|
|
|
|
|
|
|
|
improves open and cmd adds a new help function run.
the extra optional arguments provide all the features of
subprocess used by every module of VyOS.
popen matches closely subprocess.Popen
cmd matches closely subprocess.check_output
run matches closely subprocess.call and os.system
popen returns the string and errord code
cmd returns the string and raise on error
(the class can be defined the default is OSError)
run returns the return code of the command
the options are:
shell=None, the code auto-detect is a shell is required
decode=None, use .decode() otherwise the encoding will be used
env=None, universal_newlines=None: as per subprocess.Popen
input=None, timeout=None, stdout=PIPE, stderr=STDOUT,
as per Popen.communicate
|
|
Now both files and directories are supported.
|
|
ifconfig: T2205: silence ethtool harmless failures
|
|
Not all interface are capable of all features. Since commands are
now checked for valid completion, ethtool command failure must
be ignored.
|
|
|
|
|
|
|
|
OpenVPN, WIFI, SSTP all had the same boiler plate copied about checking if a
process associated with a pidfile is running or not. This has been migrated to
the common library function vyos.util.process_running().
|
|
|
|
Instead of including all functions/classes from a file, only include the
ones we really need.
|
|
|
|
|
|
|
|
python/xml syntax
|
|
|
|
|
|
|
|
|
|
Really, how many times can we write the same thing.
|
|
descriptions such as 1w3d18h42m12s.
|
|
|
|
|
|
Since the format is common in /proc, make parsing the data a library
function.
|
|
|
|
|
|
VyOSError is now only raised on improper config operations and internal errors,
such as trying to use a function on a wrong kind of node.
ConfigError should be used by scripts to indicate configuration mistakes
and error conditions.
|