diff options
author | William Harrington <kb0iic@berzerkula.org> | 2021-04-05 14:01:56 -0500 |
---|---|---|
committer | William Harrington <kb0iic@berzerkula.org> | 2021-04-05 14:01:56 -0500 |
commit | 95106e41d0abc92a05384092c93f266dbd1bd9e7 (patch) | |
tree | 494fe70c951365d5681bbbc541fe094dbd7eb2a7 /umountvirtfs.sh | |
parent | 2d6c50cadac6a03f8b57e92c3bc2f7988d0ae6a6 (diff) |
Create directories and essential files outside of chroot. Then chroot. When stripping, exit status is not 0 when strip finds uknown formats. Just return true. Make createdirs, umountvirtfs and essential files as separate scripts.
Diffstat (limited to 'umountvirtfs.sh')
-rw-r--r-- | umountvirtfs.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/umountvirtfs.sh b/umountvirtfs.sh new file mode 100644 index 0000000..8eb969f --- /dev/null +++ b/umountvirtfs.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +printf "%b" "${GRN}Unmounting virtual kernel filesystems${RST}...\n" +if mountpoint "${LFS}"/dev/pts >/dev/null 2>&1; then + sudo umount "${LFS}"/dev/pts +else + printf "%b" " ${IYLW}${LFS}/dev/pts${IGRN} is already unmounted${RST}\n" +fi +if mountpoint "${LFS}"/dev >/dev/null 2>&1; then + sudo umount "${LFS}"/dev +else + printf "%b" " ${IYLW}${LFS}/dev${IGRN} is already unmounted${RST}\n" +fi +if mountpoint "${LFS}"/proc >/dev/null 2>&1; then + sudo umount "${LFS}"/proc +else + printf "%b" " ${IYLW}${LFS}/proc${IGRN} is already unmounted${RST}\n" +fi +if mountpoint "${LFS}"/sys >/dev/null 2>&1; then + sudo umount "${LFS}"/sys +else + printf "%b" " ${IYLW}${LFS}/sys${IGRN} is already unmounted${RST}\n" +fi +if mountpoint "${LFS}"/run >/dev/null 2>&1; then + sudo umount "${LFS}"/run +else + printf "%b" " ${IYLW}${LFS}/run${IGRN} is already unmounted${RST}\n" +fi |