On Mon, Dec 18, 2006 at 06:15:20PM +0100, Dario Freni wrote: > Hi Koen, > > Koen Martens ([EMAIL PROTECTED]) wrote: > > I've been working on a customized freesbie2-RC1 cd, and found what i > > think is a small bug in the customroot plugin. If you put a > > master.passwd file in the customroot's etc directory, a new > > master.passwd.db is built, but no pwd.db and spwd.db. > > True, i'm going to add the pwd_mkdb command as you suggested. > > > Furthermore, the path to master.passwd in the if statement is wrong, > > since CUSTOMROOT is relative to the freesbie root, but at that point > > in the script the pwd _is_ the customroot directory already.. > > That is the same thing, I don't see anything on checking the existence > of a file using its absolute path or its relative one. It seems more > readable to me if we make clear that we're checking the existence of > the file in the selected ${CUSTOMROOT} (i.e.: the user is using his > own master.passwd file in the ${CUSTOMROOT}, so let's create the > related dbs into the ${BASEDIR}).
CUSTOMROOT may or not be a relative path. The default value is a relative path: CUSTOMROOT=${CUSTOMROOT:-extra/customroot} But the user may set it to an absolute path. Anyway, since we "cd $CUSTOMROOT" (line 22), we should not specify $CUSTOMROOT when looking for master.passwd (line 30): if we specified it and $CUSTOMROOT was a relative path, we would be looking in $CUSTOMROOT/$CUSTOMROOT/etc/ and this would be wrong. If you really want the script to be readable, we should change the default value of CUSTOMROOT to $LOCALDIR/extra/customroot and it becomes an absolute path. Let me know. Best Regards -- Matteo Riondato FreeBSD Committer (http://www.freebsd.org) G.U.F.I. Staff Member (http://www.gufi.org) FreeSBIE Developer (http://www.freesbie.org)
pgph5HyMm2sbh.pgp
Description: PGP signature
-- FreeSBIE mailing list (http://www.freesbie.org)