diff options
-rw-r--r-- | templates/configure/node.def | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/templates/configure/node.def b/templates/configure/node.def index 5b349e8..5f79a08 100644 --- a/templates/configure/node.def +++ b/templates/configure/node.def @@ -1,7 +1,14 @@ help: Enter configure mode -run: history -w - export _OFR_CONFIGURE=ok - newgrp vyattacfg - unset _OFR_CONFIGURE - _vyatta_op_do_key_bindings - history -r +run: if [ `id -u` == 0 ]; then + echo "You are attempting to enter configuration mode as root." + echo "It may have unintended consequences and render your system" + echo "unusable until restart." + echo "Please do it as an administrator level VyOS user instead." + else + history -w + export _OFR_CONFIGURE=ok + newgrp vyattacfg + unset _OFR_CONFIGURE + _vyatta_op_do_key_bindings + history -r + fi |