From: brian Date: Tue, 13 Jun 2006 19:05:14 +0000 (+0000) Subject: Some safety so that DEVICE_NAME[i] being "/dev/loop1" doesn't delete an X-Git-Tag: v1_7_100~1^90~8^2~131 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=5480e705051f9ca87b78e2ba3496959cb83b856f;p=fs%2Flustre-release.git Some safety so that DEVICE_NAME[i] being "/dev/loop1" doesn't delete an fstab entry with a device of "/dev/loop11". --- 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