Minor improvements to update.sh
This commit is contained in:
parent
a8544908ec
commit
d7c0e19f5f
@ -1,10 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
/bin/echo "Usage: sudo clearpassword=<password> -E update.sh"
|
||||
if [[ -z $clearpassword ]]; then
|
||||
/bin/echo "Usage: sudo clearpassword=<password> -E update.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
password=`/bin/cat /etc/txtpwd`
|
||||
auth=`/bin/echo -n $clearpassword | /usr/bin/sha512sum | /usr/bin/cut -d' ' -f 1`
|
||||
|
||||
if [ "$auth" != "$password" ]; then
|
||||
if [[ "$auth" != "$password" ]]; then
|
||||
/bin/echo "Wrong password"
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user