diff options
author | Lauri Aarnio <Lauri.Aarnio@iki.fi> | 2009-02-12 16:23:21 +0200 |
---|---|---|
committer | Lauri Leukkunen <lle@rahina.org> | 2009-02-16 11:50:38 +0200 |
commit | 09ef40c70908974f85e5d24eaf5c4296000d2474 (patch) | |
tree | 948d50b1c477fb1ba494de86266abce128c2385e | |
parent | ae9751e9a681d23eb01c63f917e666a8144c91a3 (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.emulate | 11 |
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" ;; |