You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have OpenWrt SNAPSHOT, r12985-508462a399 running in VirtualBox from openwrt-x86-64-generic-ext4-combined.img.gz . I think the problem is not specific to this platform.
Some useful functions like service are not available when the default shell defined /etc/passwd is replaced from /bin/sh to /bin/bash. I think this is due to the way the sourcing mechanism was altered in commit [[https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=12020f8a95d21547bd7d7fd1fef9cdecf2892803|#2892803 when /etc/shinit]] was added.
Arduous:
Hello,
I have OpenWrt SNAPSHOT, r12985-508462a399 running in VirtualBox from openwrt-x86-64-generic-ext4-combined.img.gz . I think the problem is not specific to this platform.
Some useful functions like service are not available when the default shell defined /etc/passwd is replaced from /bin/sh to /bin/bash. I think this is due to the way the sourcing mechanism was altered in commit [[https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=12020f8a95d21547bd7d7fd1fef9cdecf2892803|#2892803 when /etc/shinit]] was added.
Reproduction steps
samuel@bioman2:~$ ssh root@192.168.1.1
BusyBox v1.31.1 () built-in shell (ash)
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -| || | | || || |
|_____|| |||||___||| |____|
|| W I R E L E S S F R E E D O M
OpenWrt SNAPSHOT, r12985-508462a399
root@biorouter:
# opkg update >/dev/null 2>&1# opkg install bash >/dev/null 2>&1root@biorouter:
root@biorouter:
# service# head -n 1 /etc/passwdservice "" not found, the following services are available:
adblock dnsmasq gpio_switch lighttpd odhcpd sysctl system umount
boot done igmpproxy log rpcd sysfixtime ucitrack urandom_seed
cron firewall led network sshd sysntpd uhttpd urngd
root@biorouter:
root:x:0:0:root:/root:/bin/sh
root@biorouter:
# sed -i "s/ot:/bin/sh/ot:/bin/bash/" /etc/passwd# head -n 1 /etc/passwdroot@biorouter:
root:x:0:0:root:/root:/bin/bash
root@biorouter:
# exit$ ssh root@192.168.1.1logout
Connection to 192.168.1.1 closed.
samuel@bioman2:
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -| || | | || || |
|_____|| |||||___||| |____|
|| W I R E L E S S F R E E D O M
OpenWrt SNAPSHOT, r12985-508462a399
root@biorouter:
# service#-bash: service: command not found
root@biorouter:
My workaround is to source /etc/shinit in /etc/profile, but I guess it defeats the purpose of the above mentioned commit.
Thank you
The text was updated successfully, but these errors were encountered: