better 'user is root' check

Thomas Pegg thomasp at linuxfromscratch.org
Wed Dec 24 13:59:09 PST 2003


On Wed, 2003-12-24 at 07:40, Daniel Baumann wrote:
> Hi
> 
> In profiles/LFS/runit there is a check if the user is root. I find it 
> better to test that as following:
> 
> if [ $(id -u) -ne 0 ]; then [...]; fi
> 
> Regards,
> Daniel
Your right it is better, check by number instead of the name.
Thanks for the suggestion.

-- 
Thomas
LFS User : 4729
Linux User : 298329



More information about the alfs-discuss mailing list