mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-24 11:46:30 +00:00
don't touch admin passwd if adminpw doesn't exist
This commit is contained in:
parent
a2773f700b
commit
f542c6a71c
@ -2,6 +2,8 @@
|
||||
|
||||
test -n "$os_version" || source /etc/init.d/base
|
||||
|
||||
test -x /etc/init.d/adminpw || exit 0
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
# make sure root and admin users exist in shadow file
|
||||
@ -14,13 +16,11 @@ case "$1" in
|
||||
echo 'admin::::::::' >> /data/etc/shadow
|
||||
fi
|
||||
|
||||
# set root and admin passwords
|
||||
password=""
|
||||
if [ -x /etc/init.d/adminpw ]; then
|
||||
password=$(/etc/init.d/adminpw)
|
||||
fi
|
||||
# set root and admin passwords (admin is just an alias for root)
|
||||
password=$(/etc/init.d/adminpw)
|
||||
msg_begin "Setting root password"
|
||||
|
||||
# remove shadow backups
|
||||
rm -f /data/etc/shadow+
|
||||
rm -f /data/etc/shadow-
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user