about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJuan RP <xtraeme@gmail.com>2013-07-12 11:12:40 +0200
committerJuan RP <xtraeme@gmail.com>2013-07-12 11:12:40 +0200
commitd17210fb5be2be72ef8b4d1bae4934617e7217fa (patch)
tree077ac00e25a8d80e506f9d9469d18b4867fe865e
parent0fc1050790a0581dd67d413770d19b67338d9aa3 (diff)
downloadhrmpf-d17210fb5be2be72ef8b4d1bae4934617e7217fa.tar.gz
hrmpf-d17210fb5be2be72ef8b4d1bae4934617e7217fa.tar.xz
hrmpf-d17210fb5be2be72ef8b4d1bae4934617e7217fa.zip
mklive.sh.in: if REPOSITORY_CACHE not set use system default cachedir.
-rw-r--r--mklive.sh.in11
1 files changed, 5 insertions, 6 deletions
diff --git a/mklive.sh.in b/mklive.sh.in
index 24c2570..dfc8f78 100644
--- a/mklive.sh.in
+++ b/mklive.sh.in
@@ -143,7 +143,7 @@ generate_initramfs() {
     # Install required pkgs in a temporary rootdir to create
     # the initramfs and to copy required files.
     $XBPS_INSTALL_CMD -r $ROOTFS/kernel_temp -Sy \
-        base-system void-mklive >>$LOGFILE 2>&1
+        base-system void-mklive -c $REPOSITORY_CACHE >>$LOGFILE 2>&1
 
     systemd-nspawn -D $ROOTFS/kernel_temp /usr/bin/dracut --${COMPRESSTYPE} \
         --force-add "vmklive" "/boot/initrd.lz" $KERNELVERSION >>$LOGFILE 2>&1
@@ -315,6 +315,9 @@ fi
 if [ -z "$COMPRESSTYPE" ]; then
     COMPRESSTYPE=xz
 fi
+if [ -z "$REPOSITORYCACHE" ]; then
+    REPOSITORY_CACHE="/var/cache/xbps"
+fi
 
 # Create or read configuration file.
 if [ ! -r $CONFIG_FILE ]; then
@@ -364,11 +367,7 @@ if [ $? -ne 0 ]; then
 fi
 
 XBPS_ARGS="-r $ROOTFS -y"
-if [ -n "$REPOSITORY_CACHE" ]; then
-    XBPS_ARGS="$XBPS_ARGS -c $REPOSITORY_CACHE"
-else
-    XBPS_ARGS="$XBPS_ARGS -c /var/cache/xbps"
-fi
+XBPS_ARGS="$XBPS_ARGS -c $REPOSITORY_CACHE"
 XBPS_VERSION=$($XBPS_QUERY_CMD -V|awk '{print $2}')
 case $XBPS_VERSION in
 # XBPS >= 0.21