PDA

Bekijk de volledige versie : wl700gE shell type



MoD
06-11-2006, 20:41
what is the difference between #!/bin/sh and #!/bin/ash

the question is because of wl700gE uses #!/bin/ash and if I try to run a script:


# cat /shares/MYVOLUME1/MYSHARE1/test.sh
#!/bin/ash
mkdir /tmp/root

I get error:

# /shares/MYVOLUME1/MYSHARE1/ipkg.sh
/bin/ash: error while loading shared libraries: /bin/ash: symbol vprintf, version GLIBC_2.0 not defined in file libc.so.6 with link time reference

If I run :


# cat /shares/MYVOLUME1/MYSHARE1/test.sh
#!/bin/sh
mkdir /tmp/root

I get:


# /shares/MYVOLUME1/MYSHARE1/test.sh
: cannot open

also I'm curious why does it work at all, if /tmp/passwd has /bin/sh:

# cat /etc/passwd
root::0:0:root:/:/bin/sh
guest::35000:42000:guest:/:/bin/sh

but wl700gE uses /bin/ash?

MoD
06-11-2006, 20:57
should I configure busybox to enable shell script execution?

fireflash
06-11-2006, 23:39
should I configure busybox to enable shell script execution?

It does execute scripts.. If you look there is a symlink to 'sh' which links back to busybox (as does ash if I recall) If you don't have it then you'll have to recompile busybox with sh enabled. ash if I remember correctly is similar to sh and bash, but has a smaller footprint, and is incorporated into busybox.

hal2k1
07-11-2006, 09:40
what is the difference between #!/bin/sh and #!/bin/ash


It would appear that the ash shell is part of busybox.

http://www.linuxfromscratch.org/blfs/view/stable/postlfs/shells.html

http://en.wikipedia.org/wiki/Almquist_shell

http://en.wikipedia.org/wiki/BusyBox

It is supposed to be compatible with /bin/sh