diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/system/login/user/node.def | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/templates/system/login/user/node.def b/templates/system/login/user/node.def index 451cc078..41a7e048 100644 --- a/templates/system/login/user/node.def +++ b/templates/system/login/user/node.def @@ -11,3 +11,11 @@ commit:expression: $VAR(@) == "" || commit:expression: $VAR(@) == "" || $VAR(authentication/encrypted-password) != "" || $VAR(authentication/encrypted-password/@) = "!" + +end: if [ ${COMMIT_ACTION} != 'DELETE' ] && + [ -z "$VAR(authentication/public-keys)" ] && + [[ -z "$VAR(authentication/encrypted-password)" || + "$VAR(authentication/encrypted-password/@)" = "!" ]]; then + echo "either user encrypted password or public keys must be set"; + exit 1; + fi |