[Dirvish] Re: ssh as root going away

Bernd Haug haug at berndhaug.net
Thu Jan 11 14:10:52 PST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ken Dyke wrote:
> in .bash_profile and then wrote a simple script called ~/bin/rsync that
> contains:

I don't know if the general approach is recommendable, but at least
I'd think:

> #!/bin/bash
> sudo rsync $@

exec sudo rsync "$@"

would be recommended...exec makes sure the file handles and pid and
all are inherited; "$@" is bash idiom for "all my arguments just as
quoted".

lg, Bernd
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFprXsjAQAqv3HuJURAsAjAJ9dzgAcd49ubO+97yCMboKP/RiN/wCeKKBv
qiGObPcdXLBoEbL3kST/doY=
=pCok
-----END PGP SIGNATURE-----


More information about the Dirvish mailing list