Fix changing the ownership of $BUILDDIR/var/lib to LUSER when it has been
created by func_install_blfs. Fixes ticket #1729
This commit is contained in:
parent
426e40be67
commit
088130f04a
2 changed files with 9 additions and 3 deletions
|
@ -70,7 +70,7 @@ chapter_targets() { #
|
|||
cp ${CONFIG} $BUILDDIR/sources/kernel-config ;;
|
||||
esac
|
||||
# Grab the name of the target
|
||||
# This is only use to check the name in "opt_override" or "BLACKIST"
|
||||
# This is only used to check the name in "opt_override" or "BLACKIST"
|
||||
name=`echo ${this_script} | sed -e 's@[0-9]\{3,4\}-@@' \
|
||||
-e 's@-pass[0-9]\{1\}@@' \
|
||||
-e 's@-libstdc++@@' \
|
||||
|
@ -142,6 +142,8 @@ chapter_targets() { #
|
|||
case "${this_script}" in
|
||||
*addinguser)
|
||||
(
|
||||
# /var/lib may already exist and be owned by root if blfs tools
|
||||
# have been installed.
|
||||
cat << EOF
|
||||
@if [ -f luser-id ]; then \\
|
||||
function useradd() { true; }; \\
|
||||
|
@ -152,6 +154,8 @@ cat << EOF
|
|||
\$(CMDSDIR)/`dirname $file`/\$@ >> \$(LOGDIR)/\$@ 2>&1; \\
|
||||
\$(PRT_DU) >>logs/\$@
|
||||
@chown \$(LUSER):\$(LGROUP) envars
|
||||
@[ -d "\$(MOUNT_PT)/var/lib" ] && \\
|
||||
chown \$(LUSER):\$(LGROUP) \$(MOUNT_PT)/var/lib
|
||||
@chmod -R a+wt $JHALFSDIR
|
||||
@chmod a+wt \$(SRCSDIR)
|
||||
EOF
|
||||
|
|
|
@ -62,8 +62,10 @@ sudo make -j1 -C $BUILDDIR$BLFS_ROOT \
|
|||
$BUILDDIR$BLFS_ROOT/packages.xml
|
||||
|
||||
# But then $BUILDDIR/var/lib/ is owned by root if just created, which
|
||||
# prevents $LUSER to create "nss_db". Change ownership here
|
||||
sudo chown $LUSER:$LGROUP $BUILDDIR/var/lib
|
||||
# prevents $LUSER to create "nss_db". The problem is that $LUSER
|
||||
# May not have been created yet. So do not change ownership here
|
||||
# and do it in master.sh for chapter 4.
|
||||
#sudo chown $LUSER:$LGROUP $BUILDDIR/var/lib
|
||||
|
||||
# Because the BLFS Makefile is supposed to be used in chroot (or booted)
|
||||
# mode, the tracking file has wrong path for DTD. Change it:
|
||||
|
|
Reference in a new issue