mirror of
https://github.com/tasket/Qubes-VM-hardening.git
synced 2024-10-01 06:35:42 -04:00
bak dir path and issue 11
This commit is contained in:
parent
e6a00324f2
commit
244cb77b78
7
install
7
install
@ -1,14 +1,15 @@
|
||||
#!/bin/sh
|
||||
[ `id -u` -eq 0 ] || exit
|
||||
|
||||
echo Disabling the pre-release service (if present)...
|
||||
systemctl disable vm-sudo-protect.service
|
||||
|
||||
cp vm-boot-protect.sh /usr/lib/qubes/init
|
||||
chmod +x /usr/lib/qubes/init/vm-boot-protect.sh
|
||||
cp vm-boot-protect.service /lib/systemd/system
|
||||
systemctl daemon-reload
|
||||
systemctl enable vm-boot-protect.service
|
||||
|
||||
echo Disabling the pre-release service (if present)...
|
||||
systemctl disable vm-sudo-protect.service
|
||||
|
||||
echo
|
||||
echo vm-boot-protect installed!
|
||||
|
||||
|
@ -77,11 +77,12 @@ if qsvc vm-boot-protect-root && is_rwonly_persistent; then
|
||||
cd /root
|
||||
|
||||
# Deactivate private.img config dirs
|
||||
mkdir -p `dirname $dir`/vm-boot-protect
|
||||
for dir in $privdirs; do
|
||||
bakdir=`dirname $dir`/BAK-`basename $dir`
|
||||
bak2dir=`dirname $dir`/BAK2-`basename $dir`
|
||||
if [ -d $bakdir ] && [ ! -d $bak2dir ]; then
|
||||
mv $bakdir $bak2dir
|
||||
bakdir=`dirname $dir`/vm-boot-protect/BAK-`basename $dir`
|
||||
origdir=`dirname $dir`/vm-boot-protect/ORIG-`basename $dir`
|
||||
if [ -d $bakdir ] && [ ! -d $origdir ]; then
|
||||
mv $bakdir $origdir
|
||||
fi
|
||||
rm -rf $bakdir
|
||||
mv $dir $bakdir
|
||||
@ -119,6 +120,9 @@ if qsvc vm-boot-protect-root && is_rwonly_persistent; then
|
||||
if [ -d $defdir/$vmset/rw ]; then
|
||||
cp -af "$defdir/$vmset/rw/*" $rw
|
||||
fi
|
||||
|
||||
# Keep configs invisible at runtime...
|
||||
rm -rf $defdir/*
|
||||
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user