From 5480e705051f9ca87b78e2ba3496959cb83b856f Mon Sep 17 00:00:00 2001 From: brian Date: Tue, 13 Jun 2006 19:05:14 +0000 Subject: [PATCH] Some safety so that DEVICE_NAME[i] being "/dev/loop1" doesn't delete an fstab entry with a device of "/dev/loop11". --- lustre/scripts/lustre_config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/scripts/lustre_config.sh b/lustre/scripts/lustre_config.sh index bbbd51b..bfaf21b 100755 --- a/lustre/scripts/lustre_config.sh +++ b/lustre/scripts/lustre_config.sh @@ -1198,7 +1198,7 @@ modify_fstab() { # Execute remote command to modify /etc/fstab device_name=${DEVICE_NAME[i]//\//\\/} - COMMAND="(sed -i \"/${device_name}/d\" /etc/fstab; \ + COMMAND="(sed -i \"/^${device_name}[ ]/d\" /etc/fstab; \ echo -e \"${mntent}\" >> /etc/fstab)" ${REMOTE} ${HOST_NAME[i]} "${COMMAND}" >&2 if [ $? -ne 0 ]; then -- 1.8.3.1