Advertisement
s243a

umount_unneeded() LN#802-807 (tahrpup)

Apr 24th, 2018
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.48 KB | None | 0 0
  1. # LN# 802-807 of /initrd/init (tahrpup) - https://www.pearltrees.com/s243a/initrd-init/id19535893/item224276141
  2. # LN# 862-867 of https://github.com/puppylinux-woof-CE/woof-CE/blob/c96d661c2232caef1d69c693de673fb0e54796f8/initrd-progs/0initrd/init#L862 (13 Mar 2018)
  3. umount_unneeded() {
  4.  MTD_PARTS="$(mount | cut -f1 -d' ' | grep '^/dev' | grep -v loop | cut -f3 -d'/')"
  5.  for ONE_PART in $MTD_PARTS;do
  6.   [ "$(echo -n "$KEEPMOUNTED" | grep "$ONE_PART")" ] || umount /dev/$ONE_PART
  7.  done
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement