summaryrefslogtreecommitdiffstats
path: root/source/a/mkinitrd/mkinitrd
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/mkinitrd/mkinitrd')
-rw-r--r--source/a/mkinitrd/mkinitrd9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/a/mkinitrd/mkinitrd b/source/a/mkinitrd/mkinitrd
index 7a8d772a..3c90f06b 100644
--- a/source/a/mkinitrd/mkinitrd
+++ b/source/a/mkinitrd/mkinitrd
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Copyright 2004 Slackware Linux, Inc., Concord, CA, USA
# Copyright 2004 Patrick J. Volkerding, Concord, CA, USA
# Copyright 2007, 2008, 2009, 2010, 2011, 2015, 2016, 2017 Patrick J. Volkerding, Sebeka, MN, USA
@@ -653,8 +653,11 @@ if [ ! -z "$CRYPT" -o ! -z "$LVM" ]; then
elif ! echo ${MODULE_LIST} | grep -q dm-mod ; then
MODULE_LIST="$MODULE_LIST:dm-mod"
fi
- if ! echo ${MODULE_LIST} | grep -q dm-snapshot ; then
- MODULE_LIST="$MODULE_LIST:dm-snapshot"
+ # Ensure that dm-snapshot is included if LVM is used:
+ if [ ! -z "$LVM" ]; then
+ if ! echo ${MODULE_LIST} | grep -q dm-snapshot ; then
+ MODULE_LIST="$MODULE_LIST:dm-snapshot"
+ fi
fi
mkdir -p $SOURCE_TREE/lib/udev/rules.d
echo 'KERNEL=="dm-[0-9]*", OPTIONS+="db_persist"' > \