Always re-create private.img
To support clean in-place template reinstall for issue #2061.
This commit is contained in:
parent
819757e754
commit
14f5fc2f1f
@ -65,6 +65,7 @@ fi
|
|||||||
|
|
||||||
%post
|
%post
|
||||||
echo "--> Processing the root.img... (this might take a while)"
|
echo "--> Processing the root.img... (this might take a while)"
|
||||||
|
rm -f %{dest_dir}/root.img
|
||||||
cat %{dest_dir}/root.img.part.* | tar --sparse -xf - -C %{dest_dir}
|
cat %{dest_dir}/root.img.part.* | tar --sparse -xf - -C %{dest_dir}
|
||||||
rm -f %{dest_dir}/root.img.part.*
|
rm -f %{dest_dir}/root.img.part.*
|
||||||
chown root.qubes %{dest_dir}/root.img
|
chown root.qubes %{dest_dir}/root.img
|
||||||
@ -78,14 +79,12 @@ tar --sparse -cf %{dest_dir}/clean-volatile.img.tar -C %{dest_dir} volatile.img
|
|||||||
chown root.qubes %{dest_dir}/clean-volatile.img.tar
|
chown root.qubes %{dest_dir}/clean-volatile.img.tar
|
||||||
chmod 0660 %{dest_dir}/clean-volatile.img.tar
|
chmod 0660 %{dest_dir}/clean-volatile.img.tar
|
||||||
|
|
||||||
if [ "$1" = 1 ] ; then
|
|
||||||
# installing for the first time
|
|
||||||
echo "--> Creating private.img..."
|
echo "--> Creating private.img..."
|
||||||
|
rm -f %{dest_dir}/private.img
|
||||||
truncate -s 2G %{dest_dir}/private.img
|
truncate -s 2G %{dest_dir}/private.img
|
||||||
mkfs.ext4 -m 0 -q -F %{dest_dir}/private.img
|
mkfs.ext4 -m 0 -q -F %{dest_dir}/private.img
|
||||||
chown root.qubes %{dest_dir}/private.img
|
chown root.qubes %{dest_dir}/private.img
|
||||||
chmod 0660 %{dest_dir}/private.img
|
chmod 0660 %{dest_dir}/private.img
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
export XDG_DATA_DIRS=/usr/share/
|
export XDG_DATA_DIRS=/usr/share/
|
||||||
|
Loading…
Reference in New Issue
Block a user