-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
checktrust: Let getty display a warning if trust is lost
Create a service "checktrust" which is run before getty is started. If this service detects that the system has lost trust, a warning message is dropped into /node/issue.d/notrust.issue. Create a symlink for agetty in /etc/issue.d to the (only possibly existing) file in the /node path. agetty shows this message before the login prompt. checktrust-for-getty: Use checktrust command
- Loading branch information
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#! /usr/bin/bash | ||
|
||
if [ "$(/usr/sbin/checktrust)" = "not trusted" ]; then | ||
mkdir -p /node/issue.d | ||
cat > /node/issue.d/notrust.issue <<EOF | ||
** WARNING: Loss of trust detected ** | ||
** Looks like your machine lost the trust of our network. Maybe it was offline for too long. ** | ||
** You won't be able to log in. ** | ||
** Please contact IT Helpdesk: <helpdesk@molgen.mpg.de>, phone: -1708 ** | ||
EOF | ||
else | ||
rm -f /node/issue.d/notrust.issue | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description=Check Mariux64 trust for getty | ||
Before=getty@.service | ||
|
||
[Install] | ||
WantedBy=getty@.service | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=/usr/libexec/getty-checktrust | ||
RemainAfterExit=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters