Hello Bastian, Bastian Kleineidam schrieb am Mon 19. May, 20:39 (+0200): > Am Montag, 19. Mai 2008 00:51:34 schrieb Jörg Sommer: > > I would like to give the -C and the -y option for the fsck call. And > > maybe you should consider the fsck call is a shell command, i.e. I would > > like to do something like: !on_ac_power || fsck -C -y -p %(FSCKTARGET) > > > > Otherwise the user can't login, if the fsck fails. He can't repair it, > > because he doesn't own the device. Removing the -p option or adding the > > -y option would help. > Here is an experimental patch adding a custom fsck option to mount.crypt. > Just specify <volume options="exec,nodev,fsck=myfsck" ...> in > pam_mount.conf.xml to set a custom fsck command.
Why do you introduce a new way? What's wrong in using the fsck field
from /etc/security/pam_mount.conf.xml?
--- /sbin/mount.crypt.orig 2008-05-19 14:34:09.564151545 +0200
+++ /sbin/mount.crypt 2008-05-19 20:18:14.754767519 +0200
@@ -96,6 +96,7 @@
luks_ro="";
LOOP=false
DOFSCK=false;
+FSCK="fsck"
Please remove this and …
MOUNTOPTIONS=""
OLDIFS="$IFS";
IFS=", ";
@@ -109,7 +110,11 @@
(keysize) KEYSIZE="$VAL";;
(hash) HASH="$VAL";;
(fstype) FSTYPE="$VAL";;
- (fsck) DOFSCK="true";;
+ (fsck) DOFSCK="true";
+ if [ -n "$VAL" ]; then
+ FSCK="$VAL";
+ fi
… replace this by.
if [ -n "$VAL" ]; then
FSCK="$VAL";
else
FSCK="fsck -p";
fi
@@ -183,7 +188,7 @@
fi;
if [ "$DOFSCK" == "true" ]; then
- fsck -p "/dev/mapper/$DMDEVICE";
+ "$FSCK" -p "/dev/mapper/$DMDEVICE";
and this by
$FSCK "/dev/mapper/$DMDEVICE"
This would be much flexible.
Bye, Jörg.
--
Stasi 2.0 – http://www.dataloo.de/stasi-20-525.html
signature.asc
Description: Digital signature http://en.wikipedia.org/wiki/OpenPGP

