Whamcloud - gitweb
Some safety so that DEVICE_NAME[i] being "/dev/loop1" doesn't delete an
authorbrian <brian>
Tue, 13 Jun 2006 19:05:14 +0000 (19:05 +0000)
committerbrian <brian>
Tue, 13 Jun 2006 19:05:14 +0000 (19:05 +0000)
fstab entry with a device of "/dev/loop11".

lustre/scripts/lustre_config.sh

index bbbd51b..bfaf21b 100755 (executable)
@@ -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