mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 05:36:32 +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 -n "$os_version" || source /etc/init.d/base
|
||||||
|
|
||||||
|
test -x /etc/init.d/adminpw || exit 0
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
# make sure root and admin users exist in shadow file
|
# make sure root and admin users exist in shadow file
|
||||||
@ -14,13 +16,11 @@ case "$1" in
|
|||||||
echo 'admin::::::::' >> /data/etc/shadow
|
echo 'admin::::::::' >> /data/etc/shadow
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# set root and admin passwords
|
# set root and admin passwords (admin is just an alias for root)
|
||||||
password=""
|
|
||||||
if [ -x /etc/init.d/adminpw ]; then
|
|
||||||
password=$(/etc/init.d/adminpw)
|
password=$(/etc/init.d/adminpw)
|
||||||
fi
|
|
||||||
msg_begin "Setting root password"
|
msg_begin "Setting root password"
|
||||||
|
|
||||||
|
# remove shadow backups
|
||||||
rm -f /data/etc/shadow+
|
rm -f /data/etc/shadow+
|
||||||
rm -f /data/etc/shadow-
|
rm -f /data/etc/shadow-
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user