slackit-ml
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Slackware.it] bug in /etc/rc.d/rc.S slack12.1


From: riko
Subject: Re: [Slackware.it] bug in /etc/rc.d/rc.S slack12.1
Date: Thu, 13 Nov 2008 16:47:56 +0100
User-agent: Thunderbird 2.0.0.17 (X11/20080914)

Conraid ha scritto:
> io lo uso e funziona. Anche se adesso ho la -current.
> E secono me quel fi va bene
>
> Questo รจ della 12.1
>
> # Open any volumes created by cryptsetup:
> if [ -f /etc/crypttab -a -x /sbin/cryptsetup.static ]; then
>   # First, check for device-mapper support.
>   if ! grep -wq device-mapper /proc/devices ; then
>     # If device-mapper exists as a module, try to load it.
>     # Try to load a device-mapper kernel module:
>     /sbin/modprobe -q dm-mod
>   fi
>   # NOTE: we only support LUKS formatted volumes (except for swap)!
>   cat /etc/crypttab | grep -v "^#" | grep -v "^$" | while read line; do
>     LUKS=$(echo $line | tr '\t' ' ' | tr -s ' ' | cut -f1 -d' ')
>     DEV=$(echo $line | tr '\t' ' ' | tr -s ' ' | cut -f2 -d' ')
>     PASS=$(echo $line | tr '\t' ' ' | tr -s ' ' | cut -f3 -d' ')
>     OPTS=$(echo $line | tr '\t' ' ' | tr -s ' ' | cut -f4 -d' ')
>     LUKSOPTS=""
>     if echo $OPTS | grep -wq ro ; then LUKSOPTS="${LUKSOPTS} --readonly"
> ; fi
>
>     # Skip LUKS volumes that were already unlocked (in the initrd):
>     /sbin/cryptsetup.static status $LUKS 1>/dev/null 2>/dev/null &&
> continue
>     if /sbin/cryptsetup.static isLuks $DEV 2>/dev/null ; then
>       echo "Unlocking LUKS crypt volume '${LUKS}' on device '$DEV':"
>       if [ -n "${PASS}" ]; then
>         if [ -f ${PASS} ]; then
>           /sbin/cryptsetup.static ${LUKSOPTS} --key-file=${PASS}
> luksOpen $DEV $LUKS
>         elif [ "${PASS}" != "none" ]; then
>           # A password field of 'none' indicates a line for swap:
>           echo "${PASS}" | /sbin/cryptsetup.static ${LUKSOPTS} luksOpen
> $DEV $LUKS
>         fi
>       else
>         for i in seq 1 3 ; do
>           /sbin/cryptsetup.static ${LUKSOPTS} luksOpen $DEV $LUKS
> </dev/tty0 >/dev/tty0 2>&1
>           [ $? -eq 0 ] && break
>         done
>       fi

in effetti e' esattamente come era il mio prima che lo modificassi :(

ora che lo riguardo sembra proprio perfetto, il fatto e' che cosi' a me
non funziona e la modifica che ho fatto ha risolto la situazione; mi ero
convinto che fosse sbagliato, ma di fatto non lo e'. A questo punto non
so proprio dire perche' sulla mia macchina non funziona, di seguito la
mia /etc/crypttab:

swap-crypt      /dev/hdaX       /dev/random     swap
nome-home-crypt   /dev/mapper/nome-home     none    luks

faccio analisi ulteriori e cerco di capire.

grazie a tutti per il supporto, patrik mi odiera' :)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]