Skip to content

Commit

Permalink
make storage update if sailfish/home is present
Browse files Browse the repository at this point in the history
During OTA test, config.ini of device encryption was created automatically by
one of the installed packages. As a result, storage conversion didn't start.
Enforce conversion if LVM configuration points to the old storage config
  • Loading branch information
rinigus committed Sep 22, 2021
1 parent 680b4cc commit 85a4769
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions jolla-configuration-tama.inc
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,13 @@ Requires: jolla-settings-accounts-extensions-3rd-party-all
Meta package to install packages for %{rpm_device} configurations

%post
if [ ! -f /etc/sailfish-device-encryption-community/config.ini ]; then
if /usr/sbin/lvdisplay sailfish/home > /dev/null 2>&1 ; then
echo "Converting storage configuration"
mkdir -p /etc/sailfish-device-encryption-community
(/usr/sbin/lvrename sailfish/home sailfish/home_open && \
echo '[home_device]' > /etc/sailfish-device-encryption-community/config.ini && \
echo 'state=plain' >> /etc/sailfish-device-encryption-community/config.ini && \
sed -i '/\/home/d' /etc/fstab) || echo 'Failed to update to new storage configuration, please reflash'
fi
if /usr/sbin/lvdisplay sailfish/home > /dev/null 2>&1 ; then
echo "Converting storage configuration"
mkdir -p /etc/sailfish-device-encryption-community
(/usr/sbin/lvrename sailfish/home sailfish/home_open && \
echo '[home_device]' > /etc/sailfish-device-encryption-community/config.ini && \
echo 'state=plain' >> /etc/sailfish-device-encryption-community/config.ini && \
sed -i '/\/home/d' /etc/fstab) || echo 'Failed to update to new storage configuration, please reflash'
fi

%files

0 comments on commit 85a4769

Please sign in to comment.