summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/rc.d/ramdisk8
-rw-r--r--etc/rc.d/ramdisk-own7
2 files changed, 6 insertions, 9 deletions
diff --git a/etc/rc.d/ramdisk b/etc/rc.d/ramdisk
index 473b401..3ac0cb1 100644
--- a/etc/rc.d/ramdisk
+++ b/etc/rc.d/ramdisk
@@ -40,11 +40,9 @@ start_cmd="ramdisk_start"
ramdisk_start()
{
- for unit in $ramdisk_units
- do
+ for unit in $ramdisk_units; do
eval mdoptions=\$ramdisk_${unit}_config
- if [ "$mdoptions" = "${mdoptions##-t}" ]
- then
+ if [ "$mdoptions" = "${mdoptions##-t}" ]; then
echo "Type not specified for md$unit"
continue
fi
@@ -59,7 +57,7 @@ ramdisk_stop()
{
for unit in $ramdisk_units
do
- if [ -c /dev/md$unit ] ; then
+ if [ -c /dev/md$unit ]; then
umount -f /dev/md$unit > /dev/null 2>&1
mdconfig -d -u $unit
fi
diff --git a/etc/rc.d/ramdisk-own b/etc/rc.d/ramdisk-own
index d80b860..2c287c3 100644
--- a/etc/rc.d/ramdisk-own
+++ b/etc/rc.d/ramdisk-own
@@ -41,16 +41,15 @@ start_cmd="ramdisk_own_start"
ramdisk_own_start()
{
set -x
- for unit in $ramdisk_units
- do
+ for unit in $ramdisk_units; do
device="/dev/md$unit"
dir=`mount | grep $device | cut -d' ' -f3`
eval owner=\$ramdisk_${unit}_owner
eval perms=\$ramdisk_${unit}_perms
- [ "X$owner" != "X" ] && chown -f $owner $device $dir
- [ "X$perms" != "X" ] && chmod -f $perms /dev/md$unit $dir
+ [ "X$owner" != "X" ] && chown -f "$owner" $device $dir
+ [ "X$perms" != "X" ] && chmod -f "$perms" /dev/md$unit $dir
done
}
OpenPOWER on IntegriCloud