/etc/exports continue line
Subsystems (2)
I've been using \ to continue a line in /etc/exports, and ran into an odd problem -- if you accidentally hit the TAB key after the continue line and save, the entry becomes invalid. Since the TAB key is invisible, it can be difficult to figure out what's going on.
I reported it as Debian bug 418491 to nfs-kernel-server, and the maintainer responded by saying \ isn't a valid continue character. Comments? I routinely do this sort of thing:
/spare \
165.97.21.130(rw,no_root_squash,no_subtree_check,async) \
165.97.21.132(rw,no_subtree_check,async) \
165.97.21.133(rw,no_subtree_check,async) \
165.97.21.134(rw,no_subtree_check,async) \
165.97.21.135(rw,no_root_squash,no_subtree_check,async) \
165.97.21.136(rw,no_subtree_check,async) \
165.97.85.112(rw,no_subtree_check,async) \
165.97.85.117(rw,no_subtree_check,async)A lot easier to maintain that a single line. Is there an alternative way to continue the line?
Cheers,
Dave
-------- Original Message --------
Subject: Re: Bug#418491: nfs-kernel-server: Lots of misleading error
messages if there's a TAB in /etc/exports
Date: Thu, 12 Apr 2007 16:06:27 +0200
From: Steinar H. Gunderson <[email protected]>
To: David Liontooth <[email protected]>, [email protected]
References:
<[email protected]> <[email protected]>
Quoted 2 lines · Steinar H. Gunderson
Quoted 1 line
Try this: edit
/etc/exportsand add a TAB after a \ (continue line). For instance, mine uses\ isn't supported as continue line, TTBOMK.
Thus, closing this one; forgot to do so last time.
/* Steinar */
Signature · 11 lines
Homepage: http://www.sesse.net/ ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ NFS maillist - [email protected] https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 4 lines · David Liontooth
I've been using \ to continue a line in
/etc/exports, and ran into an odd problem -- if you accidentally hit the TAB key after the continue line and save, the entry becomes invalid. Since the TAB key is invisible, it can be difficult to figure out what's going on.
is there any file out there that does not exhibit this same behavior ? seems like the behavior you're seeing is pretty standard and imho expected ...
also, many editors have the ability to "show" whitespace ... -mike
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 20 lines · On Thursday April 12, [email protected] wrote:
I've been using \ to continue a line in
/etc/exports, and ran into an odd problem -- if you accidentally hit the TAB key after the continue line and save, the entry becomes invalid. Since the TAB key is invisible, it can be difficult to figure out what's going on.I reported it as Debian bug 418491 to nfs-kernel-server, and the maintainer responded by saying \ isn't a valid continue character. Comments? I routinely do this sort of thing:
/spare \ 165.97.21.130(rw,no_root_squash,no_subtree_check,async) \ 165.97.21.132(rw,no_subtree_check,async) \ 165.97.21.133(rw,no_subtree_check,async) \ 165.97.21.134(rw,no_subtree_check,async) \ 165.97.21.135(rw,no_root_squash,no_subtree_check,async) \ 165.97.21.136(rw,no_subtree_check,async) \ 165.97.85.112(rw,no_subtree_check,async) \ 165.97.85.117(rw,no_subtree_check,async)
Quoted 2 lines
A lot easier to maintain that a single line. Is there an alternative way to continue the line?
Use and editor that highlights spaces at the end of the line???
But yes, I hate '\' line continuation too, for exactly that reason. The only alternative for /etc/exports is something like:
/spare 165.97.21.130(rw,no_root_squash,no_subtree_check,async) /spare 165.97.21.132(rw,no_subtree_check,async) /spare 165.97.21.133(rw,no_subtree_check,async) /spare 165.97.21.134(rw,no_subtree_check,async) /spare 165.97.21.135(rw,no_root_squash,no_subtree_check,async) /spare 165.97.21.136(rw,no_subtree_check,async) /spare 165.97.85.112(rw,no_subtree_check,async) /spare 165.97.85.117(rw,no_subtree_check,async)
NeilBrown
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 39 lines · Neil Brown
Quoted 19 lines · On Thursday April 12, [email protected] wrote:
I've been using \ to continue a line in
/etc/exports, and ran into an odd problem -- if you accidentally hit the TAB key after the continue line and save, the entry becomes invalid. Since the TAB key is invisible, it can be difficult to figure out what's going on.I reported it as Debian bug 418491 to nfs-kernel-server, and the maintainer responded by saying \ isn't a valid continue character. Comments? I routinely do this sort of thing:
/spare \ 165.97.21.130(rw,no_root_squash,no_subtree_check,async) \ 165.97.21.132(rw,no_subtree_check,async) \ 165.97.21.133(rw,no_subtree_check,async) \ 165.97.21.134(rw,no_subtree_check,async) \ 165.97.21.135(rw,no_root_squash,no_subtree_check,async) \ 165.97.21.136(rw,no_subtree_check,async) \ 165.97.85.112(rw,no_subtree_check,async) \ 165.97.85.117(rw,no_subtree_check,async)Quoted 3 lines
A lot easier to maintain that a single line. Is there an alternative way to continue the line?
Use an editor that highlights spaces at the end of the line???
But yes, I hate '\' line continuation too, for exactly that reason. The only alternative for
/etc/exportsis something like:/spare 165.97.21.130(rw,no_root_squash,no_subtree_check,async) /spare 165.97.21.132(rw,no_subtree_check,async) /spare 165.97.21.133(rw,no_subtree_check,async) /spare 165.97.21.134(rw,no_subtree_check,async) /spare 165.97.21.135(rw,no_root_squash,no_subtree_check,async) /spare 165.97.21.136(rw,no_subtree_check,async) /spare 165.97.85.112(rw,no_subtree_check,async) /spare 165.97.85.117(rw,no_subtree_check,async)
Quoted 2 lines
NeilBrown
Thank you for the suggestion; that would work, though I often cut and paste chunks of lines from one exported drive listing to another.
Once you know about this quirk, it's obviously less of an issue. Still, if I imagine trying to help myself in the past from this enlightened position in the future, it would be fun to come up with a more user-friendly solution. Could exportfs just filter out TAB characters, or would you consider that unwanted code clutter?
Dave
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 1 line · David Liontooth
Once you know about this quirk, it's obviously less of an issue.
like everything else in the *nix world ;)
Quoted 2 lines
Could exportfs just filter out TAB characters,
or would you consider that unwanted code clutter?
err, i dont think that's not a good idea ... the expots is whitespace delimited, not space delimited ... that'd break configurations i'd imagine -mike
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 7 lines · David Liontooth
I've been using \ to continue a line in
/etc/exports, and ran into an odd problem -- if you accidentally hit the TAB key after the continue line and save, the entry becomes invalid. Since the TAB key is invisible, it can be difficult to figure out what's going on.I reported it as Debian bug 418491 to nfs-kernel-server, and the maintainer responded by saying \ isn't a valid continue character.
Well, he's right.
As far as I remember the line continuation has always been "\<NL>", otherwise you get a solitary <NL> which would end the entry.
Quoted 31 lines
Comments? I routinely do this sort of thing:
/spare \ 165.97.21.130(rw,no_root_squash,no_subtree_check,async) \ 165.97.21.132(rw,no_subtree_check,async) \ 165.97.21.133(rw,no_subtree_check,async) \ 165.97.21.134(rw,no_subtree_check,async) \ 165.97.21.135(rw,no_root_squash,no_subtree_check,async) \ 165.97.21.136(rw,no_subtree_check,async) \ 165.97.85.112(rw,no_subtree_check,async) \ 165.97.85.117(rw,no_subtree_check,async)A lot easier to maintain that a single line. Is there an alternative way to continue the line?
Cheers,
Dave-------- Original Message --------
Subject: Re: Bug#418491: nfs-kernel-server: Lots of misleading error
messages if there's a TAB in/etc/exports
Date: Thu, 12 Apr 2007 16:06:27 +0200
From: Steinar H. Gunderson <[email protected]>
To: David Liontooth <[email protected]>, [email protected]
References:
<[email protected]> <[email protected]>
Quoted 7 lines
Quoted 2 lines · Steinar H. Gunderson
Quoted 1 line
Try this: edit
/etc/exportsand add a TAB after a \ (continue line). For instance, mine uses\ isn't supported as continue line, TTBOMK.
Thus, closing this one; forgot to do so last time.
/* Steinar */
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs