Page MenuHomeFreeBSD

handbook: clarify that cmd examples use sh syntax
AcceptedPublic

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

Details

Reviewers
tig_freebsdfoundation.org
bcr
Group Reviewers
docs
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

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

emaste created this revision.Feb 27 2020, 3:08 PM

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.

emaste updated this revision to Diff 68896.Feb 27 2020, 5:59 PM

use <note> as suggested

bcr added a subscriber: bcr.Feb 27 2020, 7:35 PM

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 a subscriber: bjk.Feb 29 2020, 6:20 PM
bjk added inline comments.
advanced-networking/chapter.xml
3945

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

3947

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)

bcr accepted this revision as: bcr.Mar 6 2020, 6:32 PM

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