mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
usermngr: Remove ash from SupportedShell
This commit is contained in:
parent
32ab2eb2cc
commit
9598258993
2 changed files with 10 additions and 1 deletions
|
|
@ -5,7 +5,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=usermngr
|
PKG_NAME:=usermngr
|
||||||
PKG_VERSION:=1.3.4
|
PKG_VERSION:=1.3.5
|
||||||
|
|
||||||
LOCAL_DEV:=0
|
LOCAL_DEV:=0
|
||||||
ifneq ($(LOCAL_DEV),1)
|
ifneq ($(LOCAL_DEV),1)
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,10 @@ add_system_shells() {
|
||||||
system_shells=$(cat /etc/shells)
|
system_shells=$(cat /etc/shells)
|
||||||
for line in $system_shells
|
for line in $system_shells
|
||||||
do
|
do
|
||||||
|
if [ "${line}" = "/bin/ash" ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
shell_name=$(basename "${line}")
|
shell_name=$(basename "${line}")
|
||||||
# Add the shell in UCI if not exists
|
# Add the shell in UCI if not exists
|
||||||
sec=$(uci -q show users | grep -E "^users\.@shell\[[0-9]+\]\.name=\'$shell_name\'$")
|
sec=$(uci -q show users | grep -E "^users\.@shell\[[0-9]+\]\.name=\'$shell_name\'$")
|
||||||
|
|
@ -60,3 +64,8 @@ remove_shell() {
|
||||||
config_load users
|
config_load users
|
||||||
add_system_shells
|
add_system_shells
|
||||||
config_foreach remove_shell shell
|
config_foreach remove_shell shell
|
||||||
|
|
||||||
|
# Remove ash
|
||||||
|
uci -q delete users.shell_ash
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue