add check to see if alfs is called by user root
gerard at linuxfromscratch.org
Fri Jan 19 07:15:22 PST 2001
> In most of the cases, backend should be run as root. That depends of the
> profile of course. So maybe we could add some attribute, maybe even
> something like <alfs needs_root="1"> (ugly example) so if we don't have
> those privileges we exit with an error ?
> But it would be nice if configuring and compiling (<config> and <make>)
> could be done as non-root, even if we are running as a root.
> Just don't ask me how to drop those privileges in perl, I have no idea,
> yet. 8)
As for packages installed by a regular user:
force back-end to be run as root. If a user wants a package to be installed
as non-root, add an attribute in the profile's <packagd> tag like the
following (just an example may not be a great example):
<package name="cdplayer" version="1.0" as_user="gerard">
This should cause the back-end to install the package as user 'gerard'. This
can be accomplished by having back-end do something similar to "su gerard"
before running configure, make and make install.
-*- If Linux doesn't have the solution, you have the wrong problem -*-
More information about the alfs-discuss