From 694e2f6997db83ad3c772c2d40ac3a5fe52b3263 Mon Sep 17 00:00:00 2001 From: Andres Salomon Date: Wed, 27 May 2009 19:39:21 -0400 Subject: [PATCH] mkchroot: drop internal_mount functions They're only used in one place, and it'll be split up anyways later. Signed-off-by: Andres Salomon --- functions.sh | 8 -------- mkchroot.sh | 10 +++++++--- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/functions.sh b/functions.sh index 4e1e0c9..89f2ff8 100644 --- a/functions.sh +++ b/functions.sh @@ -100,14 +100,6 @@ boot EOF } -chroot_internal_mounts() -{ - root_dir="$1" - mount -t proc proc ${root_dir}/proc - mount -t devpts devpts ${root_dir}/dev/pts - mount -t tmpfs tmpfs ${root_dir}/var/cache/apt/cache -} - chroot_internal_umounts() { root_dir="$1" diff --git a/mkchroot.sh b/mkchroot.sh index 2808620..3a5a9f7 100755 --- a/mkchroot.sh +++ b/mkchroot.sh @@ -1,6 +1,6 @@ #!/bin/bash -e # -# Copyright © 2008 Andres Salomon +# Copyright © 2008-2009 Andres Salomon # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -101,7 +101,9 @@ DIST=$(printf "${LOCAL_APT_MIRROR}\n" | awk '/deb /{print $3}' | head -n1) debootstrap --arch i386 ${DIST} ${ROOT_DIR} ${MIRROR} mkdir ${ROOT_DIR}/ofw mkdir ${ROOT_DIR}/var/cache/apt/cache -chroot_internal_mounts ${ROOT_DIR} +mount -t proc proc ${ROOT_DIR}/proc +mount -t devpts devpts ${ROOT_DIR}/dev/pts +mount -t tmpfs tmpfs ${ROOT_DIR}/var/cache/apt/cache # allow daemons to be installed without breaking mv ${ROOT_DIR}/sbin/start-stop-daemon ${ROOT_DIR}/sbin/start-stop-daemon.REAL @@ -252,4 +254,6 @@ printf "${APT_SOURCES}\n" >${ROOT_DIR}/etc/apt/sources.list # done, clean up mv ${ROOT_DIR}/sbin/start-stop-daemon.REAL ${ROOT_DIR}/sbin/start-stop-daemon (chroot ${ROOT_DIR} aptitude clean) -chroot_internal_umounts ${ROOT_DIR} +umount ${ROOT_DIR}/proc +umount ${ROOT_DIR}/dev/pts +umount ${ROOT_DIR}/var/cache/apt/cache -- 2.39.5