archlinux: add Qubes Markers in pacman.conf so that changes done by qubes scripts are not inserted at the end of pacman.conf
This commit is contained in:
parent
9556931808
commit
1bbcf126ad
@ -6,7 +6,7 @@
|
|||||||
# Maintainer: Olivier Medoc <o_medoc@yahoo.fr>
|
# Maintainer: Olivier Medoc <o_medoc@yahoo.fr>
|
||||||
pkgname=qubes-vm-core
|
pkgname=qubes-vm-core
|
||||||
pkgver=`cat version`
|
pkgver=`cat version`
|
||||||
pkgrel=2
|
pkgrel=4
|
||||||
epoch=
|
epoch=
|
||||||
pkgdesc="The Qubes core files for installation inside a Qubes VM."
|
pkgdesc="The Qubes core files for installation inside a Qubes VM."
|
||||||
arch=("x86_64")
|
arch=("x86_64")
|
||||||
|
@ -198,6 +198,15 @@ systemctl daemon-reload
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
config_addlinetofile() {
|
||||||
|
|
||||||
|
FILE=$1
|
||||||
|
APPENDAFTERLINE=$2
|
||||||
|
APPENDLINE=$3
|
||||||
|
grep -q "$APPENDLINE" "$FILE" || sed "/$APPENDAFTERLINE/a$APPENDLINE" -i "$FILE"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
update_finalize() {
|
update_finalize() {
|
||||||
|
|
||||||
# Archlinux specific: Update pam.d configuration for su to enable systemd-login wrapper
|
# Archlinux specific: Update pam.d configuration for su to enable systemd-login wrapper
|
||||||
@ -213,6 +222,13 @@ update_finalize() {
|
|||||||
rm -f /etc/systemd/system/getty.target.wants/getty@tty*.service
|
rm -f /etc/systemd/system/getty.target.wants/getty@tty*.service
|
||||||
systemctl enable getty\@tty1.service
|
systemctl enable getty\@tty1.service
|
||||||
|
|
||||||
|
# Archlinux specific: Prepare pacman.conf to add qubes specific config
|
||||||
|
QUBES_MARKER="### QUBES CONFIG MARKER ###"
|
||||||
|
config_addlinetofile "/etc/pacman.conf" "NoUpgrade" "$QUBES_MARKER"
|
||||||
|
|
||||||
|
# Add Qubes setup script markers at the right place (this won't work at the end of pacman.conf)"
|
||||||
|
config_addlinetofile "/etc/pacman.conf "$QUBES_MARKER" "### QUBES BEGIN ###"
|
||||||
|
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user