added housekeeping to virtual fs at the end of the build
This commit is contained in:
parent
8a43b5b6cf
commit
7d9a82d296
3 changed files with 37 additions and 3 deletions
|
@ -1016,7 +1016,7 @@ EOF
|
|||
if [[ "${METHOD}" = "chroot" ]]; then
|
||||
(
|
||||
cat << EOF
|
||||
all: chapter2 chapter3 chapter4 chapter5 chapter6 chapter7 chapter8
|
||||
all: chapter2 chapter3 chapter4 chapter5 chapter6 chapter7 chapter8 do-housekeeping
|
||||
@\$(call echo_finished,$VERSION)
|
||||
|
||||
chapter2: 023-creatingtoolsdir 024-creatingcrossdir 025-addinguser 026-settingenvironment
|
||||
|
@ -1077,6 +1077,17 @@ restore-lfs-env:
|
|||
@chown lfs:lfs /home/lfs/.bash* && \\
|
||||
touch \$@
|
||||
|
||||
do-housekeeping:
|
||||
-umount \$(MOUNT_PT)/dev/pts
|
||||
-umount \$(MOUNT_PT)/dev/shm
|
||||
-umount \$(MOUNT_PT)/dev
|
||||
-umount \$(MOUNT_PT)/sys
|
||||
-umount \$(MOUNT_PT)/proc
|
||||
-if [ ! -f user-lfs-exist ]; then \\
|
||||
userdel lfs; \\
|
||||
rm -rf /home/lfs; \\
|
||||
fi;
|
||||
|
||||
EOF
|
||||
) >> $MKFILE
|
||||
fi
|
||||
|
@ -1146,6 +1157,7 @@ restore-lfs-env:
|
|||
@chown lfs:lfs /home/lfs/.bash* && \\
|
||||
touch \$@
|
||||
|
||||
|
||||
EOF
|
||||
) >> $MKFILE
|
||||
fi
|
||||
|
|
|
@ -561,6 +561,17 @@ restore-lfs-env:
|
|||
@chown lfs:lfs /home/lfs/.bash* && \\
|
||||
touch \$@
|
||||
|
||||
do-housekeeping:
|
||||
-umount \$(MOUNT_PT)/dev/pts
|
||||
-umount \$(MOUNT_PT)/dev/shm
|
||||
-umount \$(MOUNT_PT)/dev
|
||||
-umount \$(MOUNT_PT)/sys
|
||||
-umount \$(MOUNT_PT)/proc
|
||||
-if [ ! -f user-lfs-exist ]; then \\
|
||||
userdel lfs; \\
|
||||
rm -rf /home/lfs; \\
|
||||
fi;
|
||||
|
||||
EOF
|
||||
) >> $MKFILE
|
||||
|
||||
|
|
|
@ -376,7 +376,7 @@ EOF
|
|||
# as a dependency.
|
||||
(
|
||||
cat << EOF
|
||||
all: chapter4 chapter5 chapter6 chapter789
|
||||
all: chapter4 chapter5 chapter6 chapter789 do_housekeeping
|
||||
@\$(call echo_finished,$VERSION)
|
||||
|
||||
chapter4: 020-creatingtoolsdir 021-addinguser 022-settingenvironment
|
||||
|
@ -431,7 +431,18 @@ restore-lfs-env:
|
|||
fi;
|
||||
@chown lfs:lfs /home/lfs/.bash* && \\
|
||||
touch \$@
|
||||
|
||||
|
||||
do_housekeeping:
|
||||
-umount \$(MOUNT_PT)/sys
|
||||
-umount \$(MOUNT_PT)/proc
|
||||
-umount \$(MOUNT_PT)/dev/shm
|
||||
-umount \$(MOUNT_PT)/dev/pts
|
||||
-umount \$(MOUNT_PT)/dev
|
||||
-if [ ! -f user-lfs-exist ]; then \\
|
||||
userdel lfs; \\
|
||||
rm -rf /home/lfs; \\
|
||||
fi;
|
||||
|
||||
EOF
|
||||
) >> $MKFILE
|
||||
|
||||
|
|
Reference in a new issue