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

This commit is contained in:
Olivier Medoc 2013-04-26 09:32:10 +02:00 committed by Marek Marczykowski
parent 541474bd23
commit 79bf681509
2 changed files with 14 additions and 1 deletions

View File

@ -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")

View File

@ -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