Page MenuHomeFreeBSD

handbook: clarify that cmd examples use sh syntax
ClosedPublic

Authored by emaste on Feb 27 2020, 3:08 PM.

Details

Summary

export NFSROOTDIR=/b/tftpboot/FreeBSD/install doesn't work with (t)csh, and ${NFSROOTDIR}/etc/fstab will not be the desired file

Diff Detail

Repository
rD FreeBSD doc repository - subversion
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Anyone who's still using tcsh after all these years might recognize that export is a Bourne shell thing - but it's absolutely vital that it's documented in case new people come along.

Wouldn't it be better to wrap the paragraph in <note></note> or <important></important>?

For reference, with (t)csh you use: setenv VARIABLE "value"

in case new people come along

Yep, that's the case here - my co-op student ended up modifying the host's own /etc/fstab
I'll take a look at <note> examples.

We would have to sweep the handbook for more such examples to either add more such notes or change the instructions to be written for /bin/sh.

We should indeed do a comprehensive review of the examples in the handbook but I'd hope that we can at least address this case which has tripped someone up. (A cursory look turned up references to sh or csh for other examples.)

bjk added inline comments.
advanced-networking/chapter.xml
3945 ↗(On Diff #68896)

or some other shell like bash or zsh that is generally compatible with the bourne sh syntax.

3947 ↗(On Diff #68896)

Given that root's default shell is tcsh, a note to that effect and noting that a temporary sh session can be started by running sh might be in order.

@bcr please can you take a look at this changes? (For me everything it's correct)

If everything it's correct I can make the commit myself

(I can commit with approval from a doc committer)

I think it is good to go, we can flesh it out further in a followup commit if need be.

This revision is now accepted and ready to land.Mar 6 2020, 6:32 PM
ygy added a subscriber: ygy.

Ping ;)

Oooooops, I completely forgot about this. I'm going to make the commit right now!