mklive.sh: make it work with xbps>=0.27.
This commit is contained in:
parent
2554f93ba4
commit
de357fbda9
15
mklive.sh.in
15
mklive.sh.in
@ -114,6 +114,13 @@ _EOF
|
|||||||
exit 1
|
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() {
|
install_packages() {
|
||||||
for f in ${PACKAGE_LIST}; do
|
for f in ${PACKAGE_LIST}; do
|
||||||
info_msg " $f"
|
info_msg " $f"
|
||||||
@ -138,11 +145,10 @@ install_packages() {
|
|||||||
if [ -f $ROOTFS/usr/lib/systemd/system/NetworkManager.service ]; then
|
if [ -f $ROOTFS/usr/lib/systemd/system/NetworkManager.service ]; then
|
||||||
systemd-nspawn -D $ROOTFS systemctl enable NetworkManager.service >>$LOGFILE 2>&1
|
systemd-nspawn -D $ROOTFS systemctl enable NetworkManager.service >>$LOGFILE 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
install -Dm755 /usr/sbin/void-installer $ROOTFS/usr/sbin/void-installer
|
|
||||||
}
|
}
|
||||||
|
|
||||||
generate_initramfs() {
|
generate_initramfs() {
|
||||||
|
copy_void_keys $ROOTFS/kernel_temp
|
||||||
# Install required pkgs in a temporary rootdir to create
|
# Install required pkgs in a temporary rootdir to create
|
||||||
# the initramfs and to copy required files.
|
# the initramfs and to copy required files.
|
||||||
$XBPS_INSTALL_CMD -r $ROOTFS/kernel_temp -Sy \
|
$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_ARGS="$XBPS_ARGS -c $REPOSITORY_CACHE"
|
||||||
XBPS_VERSION=$($XBPS_QUERY_CMD -V|awk '{print $2}')
|
XBPS_VERSION=$($XBPS_QUERY_CMD -V|awk '{print $2}')
|
||||||
case $XBPS_VERSION in
|
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
|
esac
|
||||||
|
|
||||||
# Sync index for remote repos first.
|
# Sync index for remote repos first.
|
||||||
|
copy_void_keys $ROOTFS
|
||||||
$XBPS_INSTALL_CMD -r $ROOTFS -S >/dev/null 2>&1
|
$XBPS_INSTALL_CMD -r $ROOTFS -S >/dev/null 2>&1
|
||||||
|
|
||||||
_linux_series=$($XBPS_QUERY_CMD -r $ROOTFS -Rx linux)
|
_linux_series=$($XBPS_QUERY_CMD -r $ROOTFS -Rx linux)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user