mirror of
https://github.com/tasket/Qubes-VM-hardening.git
synced 2024-10-01 06:35:42 -04:00
move rc back before mount
This commit is contained in:
parent
67315b0119
commit
bbdc5b711b
BIN
.vm-boot-protect.sh.kate-swp
Normal file
BIN
.vm-boot-protect.sh.kate-swp
Normal file
Binary file not shown.
@ -30,7 +30,7 @@ rwbak=$rw/vm-boot-protect
|
|||||||
errlog=/var/run/vm-protect-error
|
errlog=/var/run/vm-protect-error
|
||||||
servicedir=/var/run/qubes-service
|
servicedir=/var/run/qubes-service
|
||||||
defdir=/etc/default/vms
|
defdir=/etc/default/vms
|
||||||
version="0.9.0"
|
version="0.9.1"
|
||||||
|
|
||||||
# Define sh, bash, X and desktop init scripts in /home/user
|
# Define sh, bash, X and desktop init scripts in /home/user
|
||||||
# to be protected
|
# to be protected
|
||||||
@ -111,11 +111,25 @@ abort_startup() {
|
|||||||
|
|
||||||
|
|
||||||
echo >$errlog # Clear
|
echo >$errlog # Clear
|
||||||
|
|
||||||
if qsvc vm-boot-protect-cli; then
|
if qsvc vm-boot-protect-cli; then
|
||||||
abort_startup RELOCATE "CLI requested."
|
abort_startup RELOCATE "CLI requested."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Run rc file commands if they exist
|
||||||
|
if qsvc vm-boot-protect-root && is_rwonly_persistent; then
|
||||||
|
# Get list of enabled tags from Qubes services
|
||||||
|
tags=`find $servicedir -name 'vm-boot-tag-*' -type f -printf '%f\n' \
|
||||||
|
| sort | sed -E 's|^vm-boot-tag-|\@tags/|'`
|
||||||
|
|
||||||
|
for rcbase in vms.all $tags $vmname; do
|
||||||
|
if [ -e "$defdir/$rcbase.rc" ]; then
|
||||||
|
. "$defdir/$rcbase.rc"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
if qsvc vm-boot-protect || qsvc vm-boot-protect-root; then
|
if qsvc vm-boot-protect || qsvc vm-boot-protect-root; then
|
||||||
# Mount private volume in temp location
|
# Mount private volume in temp location
|
||||||
mkdir -p $rw
|
mkdir -p $rw
|
||||||
@ -154,17 +168,6 @@ fi
|
|||||||
|
|
||||||
if qsvc vm-boot-protect-root && is_rwonly_persistent; then
|
if qsvc vm-boot-protect-root && is_rwonly_persistent; then
|
||||||
|
|
||||||
# Get list of enabled tags from Qubes services
|
|
||||||
tags=`find $servicedir -name 'vm-boot-tag-*' -type f -printf '%f\n' \
|
|
||||||
| sort | sed -E 's|^vm-boot-tag-|\@tags/|'`
|
|
||||||
|
|
||||||
# Run rc file commands if they exist
|
|
||||||
for rcbase in vms.all $tags $vmname; do
|
|
||||||
if [ -e "$defdir/$rcbase.rc" ]; then
|
|
||||||
. "$defdir/$rcbase.rc"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Check hashes
|
# Check hashes
|
||||||
checkcode=0
|
checkcode=0
|
||||||
for sha_base in $vmname $tags vms.all; do
|
for sha_base in $vmname $tags vms.all; do
|
||||||
|
Loading…
Reference in New Issue
Block a user