From 8924ef00aefc83ff6754aa669da5640a395be83a Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Mon, 3 Jun 2013 20:20:52 +0200 Subject: [PATCH] initrd.scripts: uniform {} style --- defaults/initrd.scripts | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index bd75905..940c893 100644 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -1378,16 +1378,14 @@ setup_squashfs_aufs() { mount --bind "${CDROOT_PATH}" "${new_cdroot}" } -get_mounts_list() -{ +get_mounts_list() { awk ' /^[[:blank:]]*#/ { next } { print $1 } ' ${NEW_ROOT}/etc/initramfs.mounts } -get_mount_fstype() -{ +get_mount_fstype() { [ -e "${NEW_ROOT}"/etc/fstab ] || return 1 awk -v fs="$1" ' /^[[:blank:]]*#/ { next } @@ -1395,8 +1393,7 @@ get_mount_fstype() ' ${NEW_ROOT}/etc/fstab } -get_mount_options() -{ +get_mount_options() { [ -e "${NEW_ROOT}"/etc/fstab ] || return 1 awk -v fs="$1" ' /^[[:blank:]]*#/ { next } @@ -1404,8 +1401,7 @@ get_mount_options() ' ${NEW_ROOT}/etc/fstab } -get_mount_device() -{ +get_mount_device() { [ -e "${NEW_ROOT}"/etc/fstab ] || return 1 awk -v fs="$1" ' /^[[:blank:]]*#/ { next } @@ -1418,7 +1414,6 @@ get_mount_device() # which then rejects the mount. # To make like a little easier, busybox mount does not care about leading, # trailing or duplicate commas. -strip_mount_options() -{ +strip_mount_options() { sed -r 's/(,|^)(no)?auto(,|$)/,/g' }