summaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authorSebastian2010-04-11 19:48:33 +0200
committerSebastian2010-04-11 19:48:33 +0200
commitc8f51a43fa97e5f42df9b82d1427c33b8d988bb8 (patch)
tree1a4d69f701fede992dfa3b61e3ead9d2381a3b20 /inc
parentadded dependency based system to run defined tasks (diff)
downloadbroot-c8f51a43fa97e5f42df9b82d1427c33b8d988bb8.tar.gz
broot-c8f51a43fa97e5f42df9b82d1427c33b8d988bb8.tar.xz
broot-c8f51a43fa97e5f42df9b82d1427c33b8d988bb8.zip
added function to quickly access a shell inside chroot
started with enlightenment lib package (incomplete, commit just for transfer)
Diffstat (limited to 'inc')
-rw-r--r--inc/chroot-functions.inc.sh2
-rw-r--r--inc/helper.inc.sh1
2 files changed, 3 insertions, 0 deletions
diff --git a/inc/chroot-functions.inc.sh b/inc/chroot-functions.inc.sh
index 5693a54..35f2589 100644
--- a/inc/chroot-functions.inc.sh
+++ b/inc/chroot-functions.inc.sh
@@ -1,4 +1,5 @@
chroot-exec () {
+ export HOME="/root"
if [ $(mount |grep -c $BROOT_BUILDROOT_PATH/dev) -eq 0 ]; then
setupBindmounts
fi
@@ -6,6 +7,7 @@ chroot-exec () {
}
chroot-aptinstall () {
+ export HOME="/root"
if [ $(mount |grep -c $BROOT_BUILDROOT_PATH/dev) -eq 0 ]; then
setupBindmounts
fi
diff --git a/inc/helper.inc.sh b/inc/helper.inc.sh
index 00c1915..6f63dfe 100644
--- a/inc/helper.inc.sh
+++ b/inc/helper.inc.sh
@@ -3,6 +3,7 @@ setupBindmounts() {
mount -o bind /proc $BROOT_BUILDROOT_PATH/proc
mount -t devtmpfs dev $BROOT_BUILDROOT_PATH/dev
chroot $BROOT_BUILDROOT_PATH mount -t devpts devpts /dev/pts
+ [ "x$(cat /proc/mounts | grep -q "/tmp/deb")" == "x" ] && mount -o bind /tmp/deb $BROOT_BUILDROOT_PATH/var/cache/apt/archives
}
destroyBindmounts() {