Page MenuHomeFreeBSD

handbook: clarify that cmd examples use sh syntax
ClosedPublic

Authored by emaste on Feb 27 2020, 3:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 4 2024, 5:42 PM
Unknown Object (File)
Feb 21 2024, 2:39 AM
Unknown Object (File)
Jan 18 2024, 9:24 AM
Unknown Object (File)
Jan 10 2024, 11:27 PM
Unknown Object (File)
Dec 22 2023, 11:51 PM
Unknown Object (File)
Dec 22 2023, 10:11 AM
Unknown Object (File)
Dec 20 2023, 2:57 PM
Unknown Object (File)
Dec 17 2023, 10:22 AM

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
Lint Not Applicable
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!

This revision was automatically updated to reflect the committed changes.