bsp: Allow for arguments in passwd function

Previously, we have added a passwd function to our shell which executes
passwd and restarts uhttpd afterwards, so the WebUI password is updated.

This adds the ability to still pass command-line arguments to passwd.

The quoting of the shell variable $@ is special:
"$@" expands to "$1" "$2" .., so its use is correct here.

Fixes: #117

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
This commit is contained in:
Fabian Bläse 2021-02-13 18:46:11 +01:00
parent fcb19bd233
commit 0927a4e51a
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ export HOME=${HOME:-/root}
[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
# update uhttpd passwd on passwd-change
[ -e /etc/rc.d/S50uhttpd ] && passwd() { /bin/passwd && /etc/init.d/uhttpd restart; }
[ -e /etc/rc.d/S50uhttpd ] && passwd() { /bin/passwd "$@" && /etc/init.d/uhttpd restart; }
# I'm lazy, let's add some aliases
alias ..='cd ..'