SHA256
1
0
forked from pool/cryptsetup

- on update convert noauto to nofail and turn on fsck (bnc#724113)

OBS-URL: https://build.opensuse.org/package/show/security/cryptsetup?expand=0&rev=75
This commit is contained in:
Ludwig Nussel 2011-10-27 15:53:38 +00:00 committed by Git OBS Bridge
parent ec1a451c86
commit 29279bfec8
2 changed files with 23 additions and 0 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Oct 27 15:53:20 UTC 2011 - lnussel@suse.de
- on update convert noauto to nofail and turn on fsck (bnc#724113)
-------------------------------------------------------------------
Mon Oct 10 00:18:10 UTC 2011 - jeffm@suse.com

View File

@ -56,6 +56,7 @@ Obsoletes: util-linux-crypto <= 2.12r
# we need losetup
Requires: util-linux
PreReq: %fillup_prereq %insserv_prereq
PreReq: coreutils diffutils
%description
cryptsetup is used to conveniently set up dm-crypt based device-mapper
@ -166,6 +167,23 @@ if [ -e /var/run/cryptsetup.boot.crypto.enabled ]; then
%{fillup_and_insserv -fY boot.crypto}
fi
%{fillup_and_insserv boot.crypto-early}
#
# convert noauto to nofail and turn on fsck (bnc#724113)
#
marker="/var/adm/crypsetup.fstab.noauto_converted"
if [ "$FIRST_ARG" -gt 1 -a ! -e "$marker" ]; then
echo "updating /etc/fstab ... "
tmpfstab="/etc/fstab.cryptsetup.$$"
sed -e '/^\/dev\/mapper\/cr_.*,noauto\s/{s/,noauto\(\s\)/,nofail\1/;s/ 0 0$/ 0 2/}' < /etc/fstab > "$tmpfstab"
if diff -u0 /etc/fstab "$tmpfstab"; then
echo "no change"
rm -f "$tmpfstab"
> "$marker"
else
cp "$tmpfstab" "$marker"
mv "$tmpfstab" /etc/fstab
fi
fi
%postun
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup