Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Want to replace bash w zsh as system shell on Ubuntu

On Tue, Feb 2, 2010 at 12:50, Joke de Buhr <joke@xxxxxxxxx> wrote:

> It should be easier on ubuntu because they switched their default system shell
> from bash to dash and had to change some init scripts to posix sh compliant
> syntax.

Or not. Guess why dash expands to _Debian_ alquemist shell ;)

> Second they use upstart scripts to replace some common sysv init scripts.
> These upstart scripts were rewritten from scratch and are posix sh compliant
> too.

Debian uses a different system, but is basically doing the same thing.

> Zsh runs in sh compatibility mode if it's executable was called via symlink
> from /bin/sh. But the problem is most distribution's init scripts are only
> bash compliant but are called via symlink from /bin/sh.
> Sh compliant shell scripting can't use stuff like associative arrays,
> subshell commands like "echo $(date -R)" or "[["-style tests. But some init
> scripts do.

Not really, as Bash is also in compatible mode when called as /bin/sh,
everything _should_ work. Fact it, it does not. In neither shell.
This is part of the reason why dash was needed.

>> Also, please note that you need to link to /bin/zsh not /usr/bin/zsh or
>> you _might_ break stuff (admittedly unlikely on today's single-user
>> systems).
> Dynamic linking problems (libpcre) have been fixed in recent ubuntu zsh
> releases. Probable the same in debian (unstable) releases. It's save to link
> to /bin/zsh.

I was referring to the fact that /usr can be loaded via network, whereas
/bin is required to be saved locally. Thus, having root's default shell to
anything in /usr can leave you with a non-working rescue shell and
simply rebooting with init=/bin/zsh may not be an option at that time.

> There's a difference between running "sudo -s" and changing the shell via
> "chsh" and using "su". Sudo doesn't change the HOME environmental variable to
> HOME=/root. It's set to "HOME=$HOME" so the root session uses the
> configuration files of the user. That's why you don't have to copy your
> ~/.vimrc configuration to /root/.vimrc.
> This behavior is very important if you're running a system with multiple
> admins.

True, but same as the /usr issue I don't think it's applicable in his case.


Messages sorted by: Reverse Date, Date, Thread, Author