OSDN Git Service

add vbox guestadditions installer
authorpaperbenni <paperbenni@gmail.com>
Fri, 3 Jul 2020 15:51:28 +0000 (17:51 +0200)
committerpaperbenni <paperbenni@gmail.com>
Fri, 3 Jul 2020 15:51:28 +0000 (17:51 +0200)
askutils.sh
depend/system.sh
postinstall.sh
vm/guestadditions.sh [new file with mode: 0644]

index 0d85c13..c3731f2 100755 (executable)
@@ -232,6 +232,9 @@ until this is fixed" | imenu -M
         ;;
     virtualbox)
         iroot virtualbox 1
+        if imenu -c "would you like to install virtualbox guest additions?"; then
+            iroot guestadditions 1
+        fi
         ;;
     other)
         iroot othervm 1
index 65c50e0..26113a2 100755 (executable)
@@ -38,6 +38,7 @@ while ! pacman -S --noconfirm --needed \
     gxkb \
     udiskie \
     gedit \
+    ttf-liberation \
     mpv \
     gvfs-mtp \
     unzip \
@@ -53,6 +54,12 @@ while ! pacman -S --noconfirm --needed \
 
 done
 
+# iso for postinstall guestadditions
+if iroot guestadditions; then
+    echo "installing virtualbox guest addidions"
+    pacman -S --noconfirm --needed virtualbox-guest-iso
+fi
+
 # not present on artix
 if command -v systemctl; then
     pacman -S --noconfirm --needed steam steam-native-runtime
index cdda985..29b7c80 100755 (executable)
@@ -8,3 +8,4 @@ cd /root/instantARCH
 bash ./lang/xorg.sh
 sleep 0.5
 bash ./lang/locale.sh
+bash ./vm/guestadditions.sh
diff --git a/vm/guestadditions.sh b/vm/guestadditions.sh
new file mode 100644 (file)
index 0000000..34a203b
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+if ! iroot guestadditions; then
+    exit
+fi
+
+mkdir -p /media/virtualbox
+mount /usr/lib/virtualbox/additions/*.iso /media/virtualbox
+echo "installing virtualbox guest additions. This will take some time. 
+It is normal for the first reboot after the installation of guest additions to take longer. " | imenu -M &
+
+sleep 2
+cd /media/virtualbox
+
+./VBoxLinuxAdditions.run
+
+pkill imenu
+sleep 2
+reboot