Skip to content

Commit

Permalink
functions: fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
CameronNemo authored and leahneukirchen committed Dec 29, 2022
1 parent ccdfcb7 commit fa197f0
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions functions
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,27 @@ emergency_shell() {
}

detect_virt() {
# Detect LXC (and other) containers
[ -z "${container+x}" ] || export VIRTUALIZATION=1
# Detect LXC (and other) containers
[ -z "${container+x}" ] || export VIRTUALIZATION=1
}

deactivate_vgs() {
_group=${1:-All}
if [ -x /sbin/vgchange -o -x /bin/vgchange ]; then
vgs=$(vgs|wc -l)
if [ $vgs -gt 0 ]; then
msg "Deactivating $_group LVM Volume Groups..."
vgchange -an
fi
fi
_group=${1:-All}
if [ -x /sbin/vgchange -o -x /bin/vgchange ]; then
vgs=$(vgs|wc -l)
if [ $vgs -gt 0 ]; then
msg "Deactivating $_group LVM Volume Groups..."
vgchange -an
fi
fi
}

deactivate_crypt() {
if [ -x /sbin/dmsetup -o -x /bin/dmsetup ]; then
msg "Deactivating Crypt Volumes"
for v in $(dmsetup ls --target crypt --exec "dmsetup info -c --noheadings -o open,name"); do
[ ${v%%:*} = "0" ] && cryptsetup close ${v##*:}
done
deactivate_vgs "Crypt"
fi
if [ -x /sbin/dmsetup -o -x /bin/dmsetup ]; then
msg "Deactivating Crypt Volumes"
for v in $(dmsetup ls --target crypt --exec "dmsetup info -c --noheadings -o open,name"); do
[ ${v%%:*} = "0" ] && cryptsetup close ${v##*:}
done
deactivate_vgs "Crypt"
fi
}

0 comments on commit fa197f0

Please sign in to comment.