diff options
| author | Mattias Andrée <maandree@operamail.com> | 2015-01-08 12:48:55 +0100 |
|---|---|---|
| committer | Mattias Andrée <maandree@operamail.com> | 2015-01-08 12:48:55 +0100 |
| commit | 529c9e4c731543ce7038aa7e45e5de0fb93f8e58 (patch) | |
| tree | 62a2e8d286d45e08abcb7785077527d4c9c12a37 /gotrc-examples/issue-file | |
| parent | how could I forget the copyright notice (diff) | |
| download | gates-of-tartaros-529c9e4c731543ce7038aa7e45e5de0fb93f8e58.tar.gz gates-of-tartaros-529c9e4c731543ce7038aa7e45e5de0fb93f8e58.tar.bz2 gates-of-tartaros-529c9e4c731543ce7038aa7e45e5de0fb93f8e58.tar.xz | |
/etc/issue can be supressed if it has not been changed by the initsystem
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'gotrc-examples/issue-file')
| -rw-r--r-- | gotrc-examples/issue-file | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gotrc-examples/issue-file b/gotrc-examples/issue-file index 39d7144..c2b8bef 100644 --- a/gotrc-examples/issue-file +++ b/gotrc-examples/issue-file @@ -24,7 +24,8 @@ _display () { - python3 <<EOF + if [ ! -f "/etc/issue.default" ] || [ ! "$(md5sum < "/etc/issue.default")" = "$(md5sum < "/etc/issue")" ]; then + python3 <<EOF buf = "\\033[H\\033[2J" data = None with open("/etc/issue", "rb") as f: @@ -59,7 +60,8 @@ for c in data: buf += c print(buf, end = "", flush = True) EOF - echo - echo -n 'Login: ' + echo + echo -n 'Login: ' + fi } |
