From 3a77c96af7943c5ceb757ef470051f6ef5aff668 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 22 Sep 2008 11:52:12 +0100 Subject: [PATCH] Move MOUNTS variable into cleanup function for clarity; it's used nowhere else. --- debian/changelog | 2 ++ livecd.sh | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index af1d5147..05aef7c1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ livecd-rootfs (0.68) UNRELEASED; urgency=low * Unmount /proc/sys/fs/binfmt_misc, in case binfmt-support is installed and manages to mount it. + * Move MOUNTS variable into cleanup function for clarity; it's used + nowhere else. -- Colin Watson Mon, 22 Sep 2008 11:46:43 +0100 diff --git a/livecd.sh b/livecd.sh index 6ba7c5c7..7d2b7637 100755 --- a/livecd.sh +++ b/livecd.sh @@ -24,7 +24,9 @@ set -eu # Depends: debootstrap, rsync, python-minimal|python, procps, squashfs-tools cleanup() { - for mnt in $MOUNTS ${ROOT}lib/modules/*/volatile ${ROOT}var/{lock,run}; do + for mnt in ${ROOT}dev/pts ${ROOT}dev/shm ${ROOT}.dev ${ROOT}dev \ + ${ROOT}proc/sys/fs/binfmt_misc ${ROOT}proc ${ROOT}sys \ + ${ROOT}lib/modules/*/volatile ${ROOT}var/{lock,run}; do umount $mnt || true done @@ -152,7 +154,6 @@ ROOT=$(pwd)/chroot-livecd/ # trailing / is CRITICAL for FS in "$@"; do FSS="$FS${SUBARCH:+-$SUBARCH}" IMG=livecd.${FSS}.fsimg - MOUNTS="${ROOT}dev/pts ${ROOT}dev/shm ${ROOT}.dev ${ROOT}dev ${ROOT}proc/sys/fs/binfmt_misc ${ROOT}proc ${ROOT}sys" DEV="" COMP="main restricted"