|
|
@@ -1,6 +1,6 @@ |
|
|
|
#!/usr/bin/env bash |
|
|
|
|
|
|
|
version="refractasnapshot-10.2.1 (20190128)" |
|
|
|
version="refractasnapshot-10.2.3 (20190422)" |
|
|
|
|
|
|
|
TEXTDOMAIN=refractasnapshot-base |
|
|
|
TEXTDOMAINDIR=/usr/share/locale/ |
|
|
@@ -294,9 +294,12 @@ check_initrd () { |
|
|
|
if lsinitramfs "$initrd_image" | grep -q conf.d/cryptroot ; then |
|
|
|
remove_cryptroot="yes" |
|
|
|
cryptroot_message="The snapshot initrd will be modified to allow booting the unencrypted snapshot." |
|
|
|
elif lsinitramfs "$initrd_image" | grep -q cryptroot | egrep -v 'scripts|crypttab|bin' ; then |
|
|
|
remove_cryptroot="yes" |
|
|
|
cryptroot_message="The snapshot initrd will be modified to allow booting the unencrypted snapshot." |
|
|
|
fi |
|
|
|
if lsinitramfs "$initrd_image" | grep -q conf.d/resume ; then |
|
|
|
remove resume="yes" |
|
|
|
if lsinitramfs "$initrd_image" | egrep -q 'conf.d/resume|conf.d/zz-resume-auto' ; then |
|
|
|
remove_resume="yes" |
|
|
|
swap_message="The snapshot initrd will be modified to allow booting without the host's swap partition." |
|
|
|
fi |
|
|
|
if [ "$initrd_crypt" = yes ] ; then |
|
|
@@ -341,11 +344,17 @@ edit_initrd () { |
|
|
|
if [ -f conf/conf.d/cryptroot ] ; then |
|
|
|
echo "Removing cryptroot" |
|
|
|
rm -f conf/conf.d/cryptroot |
|
|
|
elif [ -f cryptroot ] ; then |
|
|
|
echo "Removing cryptroot" |
|
|
|
rm -f cryptroot |
|
|
|
fi |
|
|
|
|
|
|
|
if [ -f conf/conf.d/resume ] ; then |
|
|
|
echo "Removing resume" |
|
|
|
rm -f conf/conf.d/resume |
|
|
|
elif [ -f conf/conf.d/zz-resume-auto ] ; then |
|
|
|
echo "Removing resume" |
|
|
|
rm -f conf/conf.d/zz-resume-auto |
|
|
|
fi |
|
|
|
|
|
|
|
popd |
|
|
@@ -369,7 +378,6 @@ rebuild_initrd () { |
|
|
|
popd |
|
|
|
|
|
|
|
rm -rf /tmp/extracted |
|
|
|
rm -f /tmp/initrd.tmp |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
@@ -641,7 +649,7 @@ prepare_initrd_crypt () { |
|
|
|
# Add '-k all' or specify the initrd to use??? |
|
|
|
|
|
|
|
cp "$initrd_image" "${initrd_image}_pre-snapshot" |
|
|
|
sed -i 's/#CRYPTSETUP.*/CRYPTSETUP=y/' /etc/cryptsetup-initramfs/conf-hook |
|
|
|
sed -i 's/.*CRYPTSETUP=.*/CRYPTSETUP=y/' /etc/cryptsetup-initramfs/conf-hook |
|
|
|
|
|
|
|
if [[ -f /usr/sbin/update-initramfs.orig.initramfs-tools ]] ; then |
|
|
|
/usr/sbin/update-initramfs.orig.initramfs-tools -u |
|
|
|