Michael B Allen wrote: > Bob Proulx said: > > That is clever and I like it. But unfortunately exec -l is a bash-ism > > and so that does not work if /bin/sh is not bash but a different POSIX > > compatible shell. Users with ash installed as /bin/sh will fail. > > Because 'exec -l' is not specified by POSIX /bin/sh is not required to > > implement it. So you can't in general make that change unless you > > have changed Xsession to use '#!/bin/bash'. Then it works. But many > > object to using nonstandard bash features like this. > > Is that really feasable? Is there even a way to do it without actually > changing the /bin/sh link? Do you know of anyone that actually replaces > bash with another shell for /bin/sh on a debian system? I think in > practice that might prove to be a little daring. At least for a system > with X.
This has been discussed before but unfortunately I don't have pointers to the discussions. Look in debian-devel. But yes, people do actually run with /bin/sh pointing to ash. Debian Policy specifically allows /bin/sh to be any POSIX compatible shell. If scripts do not work with it then it is a bug. Many people use this as a standards compatibility test. It is a reasonably good one. If the #!/bin/sh script works with both bash and ash then the odds are very good that it is a portable script. Bob
pgpO6buxI5ORc.pgp
Description: PGP signature