diff options
author | Juan RP <xtraeme@gmail.com> | 2014-01-11 18:40:16 +0100 |
---|---|---|
committer | Juan RP <xtraeme@gmail.com> | 2014-01-11 18:40:16 +0100 |
commit | de357fbda99dda168457cf2dae655c071ef87b75 (patch) | |
tree | 828cc2ec093bec3eb62873fbbb6d16c5b04de846 | |
parent | 2554f93ba4a378a1218045f85459631231e36a92 (diff) | |
download | hrmpf-de357fbda99dda168457cf2dae655c071ef87b75.tar.gz hrmpf-de357fbda99dda168457cf2dae655c071ef87b75.tar.xz hrmpf-de357fbda99dda168457cf2dae655c071ef87b75.zip |
mklive.sh: make it work with xbps>=0.27.
-rw-r--r-- | mklive.sh.in | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/mklive.sh.in b/mklive.sh.in index a1740fb..35114d1 100644 --- a/mklive.sh.in +++ b/mklive.sh.in @@ -114,6 +114,13 @@ _EOF exit 1 } +copy_void_keys() { + if [ ! -d "$1"/var/db/xbps/keys ]; then + mkdir -p "$1"/var/db/xbps/keys + cp /var/db/xbps/keys/*.plist "$1"/var/db/xbps/keys + fi +} + install_packages() { for f in ${PACKAGE_LIST}; do info_msg " $f" @@ -138,11 +145,10 @@ install_packages() { if [ -f $ROOTFS/usr/lib/systemd/system/NetworkManager.service ]; then systemd-nspawn -D $ROOTFS systemctl enable NetworkManager.service >>$LOGFILE 2>&1 fi - - install -Dm755 /usr/sbin/void-installer $ROOTFS/usr/sbin/void-installer } generate_initramfs() { + copy_void_keys $ROOTFS/kernel_temp # Install required pkgs in a temporary rootdir to create # the initramfs and to copy required files. $XBPS_INSTALL_CMD -r $ROOTFS/kernel_temp -Sy \ @@ -351,12 +357,11 @@ XBPS_ARGS="-r $ROOTFS -y" XBPS_ARGS="$XBPS_ARGS -c $REPOSITORY_CACHE" XBPS_VERSION=$($XBPS_QUERY_CMD -V|awk '{print $2}') case $XBPS_VERSION in -# XBPS >= 0.21 - [0-9].[2-9][1-9]*) ;; - *) echo "Your xbps utilities are too old ($XBPS_VERSION), 0.21 is required."; exit 1;; + *) ;; esac # Sync index for remote repos first. +copy_void_keys $ROOTFS $XBPS_INSTALL_CMD -r $ROOTFS -S >/dev/null 2>&1 _linux_series=$($XBPS_QUERY_CMD -r $ROOTFS -Rx linux) |