summary refs log tree commit diff
path: root/mklive.sh.in
diff options
context:
space:
mode:
authorJuan RP <xtraeme@gmail.com>2014-11-04 16:36:33 +0100
committerJuan RP <xtraeme@gmail.com>2014-11-04 16:36:33 +0100
commit4e5adc6f040de9e14d43cf0471f5313efb30dbec (patch)
tree13353d208ed37b7396b7c862075859cc4e6f50d3 /mklive.sh.in
parentc39051a72b109baea213370e31e73e8842451405 (diff)
downloadhrmpf-4e5adc6f040de9e14d43cf0471f5313efb30dbec.tar.gz
hrmpf-4e5adc6f040de9e14d43cf0471f5313efb30dbec.tar.xz
hrmpf-4e5adc6f040de9e14d43cf0471f5313efb30dbec.zip
mklive: use a default void vpkg configuration file for base-system.
Diffstat (limited to 'mklive.sh.in')
-rw-r--r--mklive.sh.in19
1 files changed, 12 insertions, 7 deletions
diff --git a/mklive.sh.in b/mklive.sh.in
index b053e31..8700075 100644
--- a/mklive.sh.in
+++ b/mklive.sh.in
@@ -71,13 +71,15 @@ _EOF
 }
 
 copy_void_keys() {
-    if [ ! -d "$1"/var/db/xbps/keys ]; then
-        mkdir -p "$1"/var/db/xbps/keys
-        cp keys/*.plist "$1"/var/db/xbps/keys
-    fi
+    mkdir -p "$1"/var/db/xbps/keys
+    cp keys/*.plist "$1"/var/db/xbps/keys
+}
+copy_void_conf() {
+    install -Dm644 data/void-vpkgs.conf "$1"/etc/xbps/virtualpkg.d/void.conf
 }
 
 install_prereqs() {
+    copy_void_conf $VOIDHOSTDIR
     $XBPS_INSTALL_CMD -r $VOIDHOSTDIR $XBPS_REPOSITORY $XBPS_CACHEDIR -y ${REQUIRED_PKGS} >> $LOGFILE 2>&1
     if [ $? -ne 0 ]; then
         info_msg "Failed to install required software, exiting..."
@@ -89,12 +91,14 @@ install_packages() {
     if [ -n "$BASE_ARCH" ]; then
         export XBPS_ARCH="$BASE_ARCH"
     fi
+    copy_void_conf $ROOTFS
     # Check that all pkgs are reachable.
     ${XBPS_INSTALL_CMD} -r $ROOTFS $XBPS_REPOSITORY $XBPS_CACHEDIR -yn ${PACKAGE_LIST} >>$LOGFILE 2>&1
     if [ $? -ne 0 ]; then
         info_msg "Missing required binary packages, exiting..."
         error_out
     fi
+
     ${XBPS_INSTALL_CMD} -r $ROOTFS $XBPS_REPOSITORY $XBPS_CACHEDIR -y ${PACKAGE_LIST} >>$LOGFILE 2>&1
     ${XBPS_INSTALL_CMD} -r $ROOTFS $XBPS_REPOSITORY $XBPS_CACHEDIR  -yu >>$LOGFILE 2>&1
     ${XBPS_REMOVE_CMD} -r $ROOTFS $XBPS_CACHEDIR -o >>$LOGFILE 2>&1
@@ -125,6 +129,7 @@ generate_initramfs() {
     # Install required pkgs in a temporary rootdir to create
     # the initramfs and to copy required files.
     copy_dracut_files $VOIDHOSTDIR
+    copy_void_conf $VOIDHOSTDIR
     $XBPS_INSTALL_CMD -r $VOIDHOSTDIR $XBPS_REPOSITORY $XBPS_CACHEDIR -y base-system xz lz4 >>$LOGFILE 2>&1
 
     if [ "$BASE_SYSTEM_PKG" = "base-system-systemd" ]; then
@@ -323,13 +328,13 @@ install_prereqs
 #
 # Install live system and specified packages.
 #
-info_msg "[3/9] Installing void pkgs into the rootfs: ${PACKAGE_LIST} ..."
-install_packages
-
 mkdir -p "$ROOTFS"/etc
 [ -s data/motd ] && cp data/motd $ROOTFS/etc
 [ -s data/issue ] && cp data/issue $ROOTFS/etc
 
+info_msg "[3/9] Installing void pkgs into the rootfs: ${PACKAGE_LIST} ..."
+install_packages
+
 export PATH=$VOIDHOSTDIR/usr/bin:$VOIDHOSTDIR/usr/sbin:$PATH
 export LD_LIBRARY_PATH=$VOIDHOSTDIR/usr/lib
 #