mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 10:37:39 -07:00
change shell - improved verification
This commit is contained in:
parent
bc1864225d
commit
6628a9b3af
2 changed files with 7 additions and 6 deletions
|
@ -61,10 +61,10 @@ format_validation() {
|
|||
|
||||
# Checking shell
|
||||
check_shell=$(/usr/bin/chsh --list-shells | grep -w "$val" )
|
||||
if [ -z "$check_shell" ]; then
|
||||
if [ -z "$1"] || [ -z "$check_shell" ]; then
|
||||
echo "Error: shell not found"
|
||||
log_event 'debug' "$E_INVALID $V_EVENT"
|
||||
exit $E_INVALID
|
||||
log_event 'debug' "$E_NOTEXIST $V_EVENT"
|
||||
exit $E_NOTEXIST
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue