Page MenuHomeFreeBSD

Add getty/gettytab capability to generate an initial message dynamically.
ClosedPublic

Authored by dab on Aug 23 2017, 2:18 PM.

Details

Summary

This modification adds a new gettytab(5) option (iM) to specify a program to run in order to generate the initial (banner) message.

Test Plan

Install modified getty on system. Modify /etc/gettytab to specify the iM option. Logout. Get new login prompt. Verify that the login prompt is preceded by the string produced by the program specified for the iM option.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

dab created this revision.Aug 23 2017, 2:18 PM
dab added a comment.Aug 23 2017, 3:07 PM

Example run:

Wed Aug 23 10:02:42 CDT 2017: iM file

FreeBSD/amd64 (localhost)

login: Wed Aug 23 10:02:44 CDT 2017: iM file

FreeBSD/amd64 (localhost)

login:

The script specified by iM in /etc/gettytab for this system:

#!/bin/sh
echo "$(date): iM file"
dab added a comment.Aug 23 2017, 4:04 PM

@vangyzen gave his approval out-of-band; he is having some Phabricator access issues right now and suggested I mention his approval here.

wblock accepted this revision.Aug 25 2017, 2:36 PM
wblock added a subscriber: wblock.

Man page changes look fine to me.

This revision is now accepted and ready to land.Aug 25 2017, 2:36 PM
vangyzen accepted this revision.Sep 6 2017, 4:09 PM
This revision was automatically updated to reflect the committed changes.