second
This commit is contained in:
parent
19597c9297
commit
d29b1e4542
128 changed files with 15399 additions and 61 deletions
32
overlay/Linux/usr/local/src/helper-scripts/bashrc-terminal-emulator
Executable file
32
overlay/Linux/usr/local/src/helper-scripts/bashrc-terminal-emulator
Executable file
|
@ -0,0 +1,32 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Copyright (C) 2020 - 2020 ENCRYPTED SUPPORT LP <adrelanos@riseup.net>
|
||||
## See the file COPYING for copying conditions.
|
||||
|
||||
## This script gets `source`ed.
|
||||
## Using both 'return 0' and 'exit 0' to support both, `source`ing as well as
|
||||
## executing this script.
|
||||
|
||||
if [ -z "$PS1" ]; then
|
||||
true "If not running interactively, don't do anything."
|
||||
return 0
|
||||
exit 0
|
||||
fi
|
||||
|
||||
shopt -q login_shell
|
||||
var="$?"
|
||||
if [ "$var" = "0" ]; then
|
||||
true "running in a login shell, don't do anything."
|
||||
## Login shells are greeted by /etc/motd.
|
||||
return 0
|
||||
exit 0
|
||||
fi
|
||||
|
||||
## We run in a terminal emulator.
|
||||
|
||||
if ! test -d /etc/update-motd.d ; then
|
||||
return 0
|
||||
exit 0
|
||||
fi
|
||||
|
||||
run-parts /etc/update-motd.d || true
|
Loading…
Add table
Add a link
Reference in a new issue