Stopping crypto-loop assumes that all loop devices are mounted. At first it tries to umount them and then to destroy the loop disk via losetup -d. If the losetup -d failed, the complete script terminates with error. But if the loop device is used for swapping and then it's not possible to umount and to destroy it. Reproducible: Always Steps to Reproduce: 1. Append following line into /etc/fstab: /dev/hdaN none swap sw,loop=/dev/loop1,encryption=twofish 2. swapon -a 3. /etc/init.d/crypto-loop stop Actual Results: The script failed Expected Results: The script should cope with other loop devices. The crypto-loop script is schisofrenic. Start phase works only on devices defined in /etc/conf.d/crypto-loop but the stop phase processes all loop devices. I understand the motivation (deleting old encrypted devices that have been removed from config file), but contemporal access is suboptimal.
Created attachment 122032 [details, diff] /etc/init.d/crypto-loop Attemp to swapoff loop device which failed on umount
added to 2.13-r2 / 2.12r-r8, thanks !