Skip to content
Advertisement

/etc/fstab: parse error: ignore entry at line

I have scrip with function:

JavaScript

After execution – mount returns me an error:

root@xx255rs2sptry000001:~# mount -a mount: /etc/fstab: parse error: ignore entry at line 9.

Same error if I’m trying to sed manually:

JavaScript

I tried to close variables in “” – but no luck:

echo "//$STORAGE_NAME.file.core.windows.net/$STORAGE_SHARE /data cifs vers=3.0,username=$STORAGE_NAME,password=$STORAGE_KEY,dir_mode=0755,file_mode=0644,serverino" >> /etc/fstab

echo //"$STORAGE_NAME".file.core.windows.net/"$STORAGE_SHARE" /data cifs vers=3.0,username="$STORAGE_NAME",password="$STORAGE_KEY",dir_mode=0755,file_mode=0644,serverino >> /etc/fstab

And so on.

The entry in /etc/fstab looks absolutely correct, but…

What I’m doing wrong here?

If add mount entry manually, with vim and without variables – everything works fine.

Azure file share documentation – here.

Advertisement

Answer

Use:

JavaScript

This will show any spurious character causing any problems.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement