aboutsummaryrefslogtreecommitdiffstats
path: root/umountvirtfs.sh
blob: 447f6e7796dd7f0059d8b3a7f16d3447b38718cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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