usermngr: Remove ash from SupportedShell

This commit is contained in:
Vivek Kumar Dutta 2025-03-12 11:24:18 +05:30
parent 32ab2eb2cc
commit 9598258993
No known key found for this signature in database
GPG key ID: 4E09F5AD8265FD4C
2 changed files with 10 additions and 1 deletions

View file

@ -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)

View file

@ -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