diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2008-01-31 07:59:02 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2008-01-31 07:59:02 -0800 |
commit | 622bbf801bd435a3848c669ff2c0e9090cd2bb4e (patch) | |
tree | 328d04410e8fed64e6a8b25abdf58f199d916c2d /templates/system/login/user/node.def | |
parent | c2c002021eab0adff7e4d268535170658a1b0c6c (diff) | |
download | vyatta-cfg-system-622bbf801bd435a3848c669ff2c0e9090cd2bb4e.tar.gz vyatta-cfg-system-622bbf801bd435a3848c669ff2c0e9090cd2bb4e.zip |
convert templates to new syntax
Diffstat (limited to 'templates/system/login/user/node.def')
-rw-r--r-- | templates/system/login/user/node.def | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/templates/system/login/user/node.def b/templates/system/login/user/node.def index a04e990f..6c5a5c2a 100644 --- a/templates/system/login/user/node.def +++ b/templates/system/login/user/node.def @@ -1,23 +1,23 @@ tag: type: txt -help: "User account information" -syntax: pattern $(@) "^[a-zA-Z_][a-zA-Z0-9_-]*\\$?$" ; "invalid user name $(@)" +help: User account information +syntax:expression: pattern $VAR(@) "^[a-zA-Z_][a-zA-Z0-9_-]*\\$?$" ; "invalid user name $VAR(@)" # line continuation and $() expansion are done by cli, not sh. # need mandatory encrypted password. -end: "if [ -d /tmp/vyatta-delete-system-login-user-$(@).\\\$PPID ]; \ -then rm -rf /tmp/vyatta-delete-system-login-user-$(@).\\\$PPID && exit 0; \ +end:expression: "if [ -d /tmp/vyatta-delete-system-login-user-$VAR(@).$PPID ]; \ +then rm -rf /tmp/vyatta-delete-system-login-user-$VAR(@).$PPID && exit 0; \ fi && \ sudo /opt/vyatta/sbin/vyatta_update_login_user.pl \ - '$(@)' '$(full-name/@)' '$(authentication/encrypted-password/@)' \ - '$(level/@)'" -delete: "if [ x$(@) == x ]; then exit 1; fi && \ -if [ x$(@) == xroot ]; then \ + '$VAR(@)' '$VAR(full-name/@)' '$VAR(authentication/encrypted-password/@)' \ + '$VAR(level/@)'" +delete:expression: "if [ x$VAR(@) == x ]; then exit 1; fi && \ +if [ x$VAR(@) == xroot ]; then \ echo Cannot delete user \"root\" 1>&2 && exit 2; \ fi && \ -if mkdir /tmp/vyatta-delete-system-login-user-$(@).\\\$PPID >& /dev/null; \ +if mkdir /tmp/vyatta-delete-system-login-user-$VAR(@).$PPID >& /dev/null; \ then \ - if ! sudo /opt/vyatta/sbin/vyatta_update_login_user.pl -d '$(@)'; then \ - rm -rf /tmp/vyatta-delete-system-login-user-$(@).\\\$PPID; \ + if ! sudo /opt/vyatta/sbin/vyatta_update_login_user.pl -d '$VAR(@)'; then \ + rm -rf /tmp/vyatta-delete-system-login-user-$VAR(@).$PPID; \ exit 1; \ fi; \ else \ |