From 547b54238ac65b01439f22618833efe48d63a691 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Fri, 30 Aug 2013 12:01:22 +0200 Subject: [PATCH] initrd.scripts: move mount_sysfs to 00-fsdev.sh --- defaults/initrd.d/00-fsdev.sh | 6 ++++++ defaults/initrd.scripts | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/defaults/initrd.d/00-fsdev.sh b/defaults/initrd.d/00-fsdev.sh index 1dd2523..448d434 100755 --- a/defaults/initrd.d/00-fsdev.sh +++ b/defaults/initrd.d/00-fsdev.sh @@ -2,6 +2,12 @@ . /etc/initrd.d/00-common.sh +mount_sysfs() { + mount -t sysfs sysfs /sys -o noexec,nosuid,nodev \ + >/dev/null 2>&1 && return 0 + bad_msg "Failed to mount /sys!" +} + find_real_device() { local device="${1}" local out= diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index f890ec3..5044466 100755 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -33,12 +33,6 @@ bootstrap_key() { media_find "key" "${keyloc}" "CRYPT_${1}_KEYDEV" "/mnt/key" ${KEYDEVS} } -mount_sysfs() { - mount -t sysfs sysfs /sys -o noexec,nosuid,nodev >/dev/null 2>&1 - ret=$? - [ ${ret} -eq 0 ] || bad_msg "Failed to mount /sys!" -} - find_nfs() { if [ -z "${IP}" ]; then # IP is not set, return straight away