Page MenuHomeFreeBSD

simplify the motd updating script
Needs ReviewPublic

Authored by op on Oct 2 2015, 11:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 13, 11:08 PM
Unknown Object (File)
Dec 22 2023, 9:29 PM
Unknown Object (File)
Dec 13 2023, 10:59 AM
Unknown Object (File)
Nov 17 2023, 3:24 PM
Unknown Object (File)
Nov 15 2023, 9:36 AM
Unknown Object (File)
Nov 10 2023, 6:34 AM
Unknown Object (File)
Nov 8 2023, 3:19 PM
Unknown Object (File)
Nov 7 2023, 2:34 AM
Subscribers

Details

Reviewers
swills
bdrewery
Summary
  • elimnate the cp + chmod with install
  • use {} around variables
  • replace hard coded /etc/motd with MOTD_FILE variable
Test Plan

Change your /etc/motd's first line to not begin with FreeBSD word, and run the script two times.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

op retitled this revision from to simplify the motd updating script.
op updated this object.
op edited the test plan for this revision. (Show Details)
op added reviewers: bdrewery, swills, pfg.
op set the repository for this revision to rS FreeBSD src repository - subversion.
op removed rS FreeBSD src repository - subversion as the repository for this revision.

update one missing place

etc/rc.d/motd
18

What benefit is there to this? Is it solving something you ran into?

etc/rc.d/motd
18

Just a refactor.

etc/rc.d/motd
18

Line 32 missed ${MOTD_FILE}.

I don't really see the benefit in changing this; I don't like changing things for no good reason. If MOTD_FILE was in etc/defaults/rc.conf and had some reason to be moved I would be more inclined to consider this, but I don't see a great benefit in that either.

pfg removed a reviewer: pfg.