diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/interfaces-bonding.py | 19 | ||||
-rwxr-xr-x | src/op_mode/show_current_user.sh | 18 |
2 files changed, 27 insertions, 10 deletions
diff --git a/src/conf_mode/interfaces-bonding.py b/src/conf_mode/interfaces-bonding.py index c2081b8c3..a16c4e105 100755 --- a/src/conf_mode/interfaces-bonding.py +++ b/src/conf_mode/interfaces-bonding.py @@ -128,16 +128,15 @@ def get_config(): bond['mode'] = get_bond_mode(act_mode) # determine bond member interfaces (currently configured) - if conf.exists('member interface'): - bond['member'] = conf.return_values('member interface') - - # We can not call conf.return_effective_values() as it would not work - # on reboots. Reboots/First boot will return that running config and - # saved config is the same, thus on a reboot the bond members will - # not be added all (https://phabricator.vyos.net/T2030) - live_members = BondIf(bond['intf']).get_slaves() - if not (bond['member'] == live_members): - bond['shutdown_required'] = True + bond['member'] = conf.return_values('member interface') + + # We can not call conf.return_effective_values() as it would not work + # on reboots. Reboots/First boot will return that running config and + # saved config is the same, thus on a reboot the bond members will + # not be added all (https://phabricator.vyos.net/T2030) + live_members = BondIf(bond['intf']).get_slaves() + if not (bond['member'] == live_members): + bond['shutdown_required'] = True # Primary device interface if conf.exists('primary'): diff --git a/src/op_mode/show_current_user.sh b/src/op_mode/show_current_user.sh new file mode 100755 index 000000000..93e6efa61 --- /dev/null +++ b/src/op_mode/show_current_user.sh @@ -0,0 +1,18 @@ +#! /bin/bash + +echo -n "login : " ; who -m + +if [ -n "$VYATTA_USER_LEVEL_DIR" ] +then + echo -n "level : " + basename $VYATTA_USER_LEVEL_DIR +fi + +echo -n "user : " ; id -un +echo -n "groups : " ; id -Gn + +if id -Z >/dev/null 2>&1 +then + echo -n "context : " + id -Z +fi |