summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauri Aarnio <Lauri.Aarnio@iki.fi>2009-02-12 16:23:21 +0200
committerLauri Leukkunen <lle@rahina.org>2009-02-16 11:50:38 +0200
commit09ef40c70908974f85e5d24eaf5c4296000d2474 (patch)
tree948d50b1c477fb1ba494de86266abce128c2385e
parentae9751e9a681d23eb01c63f917e666a8144c91a3 (diff)
"emulate" mode: create /var/log/apt if needed (when started with "sb2 -eR")
- /var/log/apt is required when installing pacakges to the rootstrap, but not all rootstraps have it => now sb2 creates it when emulate mode is entered in fakeroot mode (sb2 -eR)
-rw-r--r--modeconf/sb2rc.emulate11
1 files changed, 11 insertions, 0 deletions
diff --git a/modeconf/sb2rc.emulate b/modeconf/sb2rc.emulate
index 6a8a56a..7027de7 100644
--- a/modeconf/sb2rc.emulate
+++ b/modeconf/sb2rc.emulate
@@ -22,6 +22,17 @@ case "$sb2rc_mode" in
SB2INIT_DEB_BUILD_ARCH_ABI="gnueabi"
;;
+ starting)
+ # Make sure /var/log/apt exists, needed when
+ # running as "sb2 -eR":
+ if [ "$SBOX_SESSION_PERM" = "root" -a \
+ -d $SBOX_TARGET_ROOT/var/log ]; then
+ if [ ! -d $SBOX_TARGET_ROOT/var/log/apt ]; then
+ mkdir $SBOX_TARGET_ROOT/var/log/apt
+ fi
+ fi
+ ;;
+
wrapper_list)
SBOX_WRAPPERS="gdb ldconfig"
;;