Ver Fonte

archlinux: implement missing pre-install directives for fstab and user creation stuff

Olivier Medoc há 11 anos atrás
pai
commit
79bf681509
2 ficheiros alterados com 14 adições e 1 exclusões
  1. 1 1
      archlinux/PKGBUILD
  2. 13 0
      archlinux/PKGBUILD.install

+ 1 - 1
archlinux/PKGBUILD

@@ -6,7 +6,7 @@
 # Maintainer: Olivier Medoc <o_medoc@yahoo.fr>
 pkgname=qubes-vm-core
 pkgver=`cat version`
-pkgrel=7
+pkgrel=11
 epoch=
 pkgdesc="The Qubes core files for installation inside a Qubes VM."
 arch=("x86_64")

+ 13 - 0
archlinux/PKGBUILD.install

@@ -148,6 +148,19 @@ systemctl enable NetworkManager.service 2> /dev/null
 ## arg 1:  the new package version
 pre_install() {
   echo "Pre install..."
+
+  # do this whole %pre thing only when updating for the first time...
+
+  mkdir -p /var/lib/qubes
+
+  # Add qubes core related fstab entries
+  echo "xen	/proc/xen	xenfs	defaults	0 0" >> /etc/fstab
+  echo "/dev/xvdi	/mnt/removable	auto	noauto,user,rw	0 0" >> /etc/fstab
+  #if [ -e /etc/fstab ] ; then 
+  # mv /etc/fstab /var/lib/qubes/fstab.orig
+  #fi
+
+  useradd --create-home user
 }
 
 ## arg 1:  the new package version