diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2019-09-02 05:23:45 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2019-09-02 05:23:45 +0200 |
commit | 576b6208d6defe240bfa2477d6dd19f1ed83bfaf (patch) | |
tree | 7d54883f16cccc4cbd414398d7fec3c437b36b49 /sys-apps/util-linux/files/crypto-loop.initd | |
parent | fdd6b67a78a966f6a2131de8fe0e539316511083 (diff) | |
download | darklin4-576b6208d6defe240bfa2477d6dd19f1ed83bfaf.tar.gz darklin4-576b6208d6defe240bfa2477d6dd19f1ed83bfaf.tar.bz2 darklin4-576b6208d6defe240bfa2477d6dd19f1ed83bfaf.tar.xz darklin4-576b6208d6defe240bfa2477d6dd19f1ed83bfaf.zip |
Cleaned most of outdated stuff
Diffstat (limited to 'sys-apps/util-linux/files/crypto-loop.initd')
-rwxr-xr-x | sys-apps/util-linux/files/crypto-loop.initd | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/sys-apps/util-linux/files/crypto-loop.initd b/sys-apps/util-linux/files/crypto-loop.initd deleted file mode 100755 index 2886982..0000000 --- a/sys-apps/util-linux/files/crypto-loop.initd +++ /dev/null @@ -1,70 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/files/crypto-loop.initd,v 1.3 2008/02/01 12:36:44 flameeyes Exp $ - -depend() { - if [ -x /etc/init.d/root ]; then - need root - else - need checkroot - fi - need modules - before localmount -} - -start() { - local status="0" - - ebegin "Starting crypto loop devices" - - if [[ -e /etc/conf.d/crypto-loop ]] ; then - egrep "^loop" /etc/conf.d/crypto-loop | \ - while read loopline ; do - eval ${loopline} - - local configured=$(awk -v MOUNT="${device}" \ - '($2 == MOUNT) { print "yes" }' /proc/mounts) - - if [[ ${configured} != "yes" ]] ; then - einfo " Loop ${loop} on device ${device} (cipher ${cipher}, key size ${keysize}): " - - if [[ -n ${hash} ]] ; then - /usr/sbin/hashalot -n ${keysize} ${hash} </dev/tty|\ - /sbin/losetup -p 0 -e ${cipher}-${keysize} ${loop} ${device} ${other} - else - /sbin/losetup -e ${cipher}-${keysize} ${loop} ${device} ${other} - fi - - if [[ $? -ne 0 ]] ; then - ewarn "Failure configuring ${loop}. Skipping." - status=1 - fi - else - ewarn " Loop ${loop} on device ${device} are already configured" - fi - done - fi - ewend ${status} "Failed to start some loop devices." - - # We do not fail if some loop devices did not start ... - return 0 -} - -stop() { - local status="0" - for loop in $(ls /dev/loop[0-9]) ; do - losetup ${loop} &> /dev/null - if [[ $? == 0 ]] ; then - umount ${loop} &>/dev/null || swapoff "${loop}" &>/dev/null - if ! /sbin/losetup -d ${loop} &> /dev/null ; then - ewarn "Failure deconfiguring ${loop}." - status=1 - fi - fi - done - ewend ${status} -} - - -# vim:ts=4 |