mirror of
https://github.com/elasticdog/packer-arch.git
synced 2026-07-17 16:36:26 +00:00
Escape DKMS variables in installation script
Otherwise these will get expanded based on values from the installer ISO and not from the chroot'ed system.
This commit is contained in:
parent
88380f1685
commit
abcec6125d
1 changed files with 4 additions and 4 deletions
|
|
@ -60,10 +60,10 @@ cat <<-EOF > "${TARGET_DIR}${CONFIG_SCRIPT}"
|
|||
# VirtualBox Guest Additions
|
||||
/usr/bin/pacman -S --noconfirm linux-headers virtualbox-guest-utils virtualbox-guest-dkms
|
||||
echo -e 'vboxguest\nvboxsf\nvboxvideo' > /etc/modules-load.d/virtualbox.conf
|
||||
guest_version=$(/usr/bin/pacman -Q virtualbox-guest-dkms | awk '{ print $2 }' | cut -d'-' -f1)
|
||||
kernel_version="$(/usr/bin/pacman -Q linux | awk '{ print $2 }')-ARCH"
|
||||
/usr/bin/dkms add "vboxguest/${guest_version}"
|
||||
/usr/bin/dkms install "vboxguest/${guest_version}" -k "${kernel_version}/x86_64"
|
||||
guest_version=\$(/usr/bin/pacman -Q virtualbox-guest-dkms | awk '{ print \$2 }' | cut -d'-' -f1)
|
||||
kernel_version="\$(/usr/bin/pacman -Q linux | awk '{ print \$2 }')-ARCH"
|
||||
/usr/bin/dkms add "vboxguest/\${guest_version}"
|
||||
/usr/bin/dkms install "vboxguest/\${guest_version}" -k "\${kernel_version}/x86_64"
|
||||
/usr/bin/systemctl enable dkms.service
|
||||
|
||||
# Vagrant-specific configuration
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue