Add a config file that allows disabling MOTD components
This commit is contained in:
parent
bc3269877a
commit
1db1e1be29
@ -83,6 +83,7 @@ create_board_package()
|
||||
if [ -f "/boot/bin/$BOARD.bin" ] && [ ! -f "/boot/script.bin" ]; then ln -sf bin/$BOARD.bin /boot/script.bin >/dev/null 2>&1 || cp /boot/bin/$BOARD.bin /boot/script.bin; fi
|
||||
rm -f /usr/local/bin/h3disp /usr/local/bin/h3consumption
|
||||
ln -sf /usr/lib/armbian/apt-updates /etc/cron.daily/apt-updates
|
||||
[ ! -f /etc/default/armbian-motd ] && cp /usr/lib/armbian/armbian-motd.default /etc/default/armbian-motd
|
||||
exit 0
|
||||
EOF
|
||||
|
||||
@ -235,6 +236,13 @@ create_board_package()
|
||||
|
||||
install -m 755 $SRC/lib/scripts/apt-updates $destination/usr/lib/armbian/apt-updates
|
||||
|
||||
cat <<-EOF > $destination/usr/lib/armbian/armbian-motd.default
|
||||
# add space-separated list of MOTD script names (without number) to exclude them from MOTD
|
||||
# Example:
|
||||
# MOTD_DISABLE="header tips updates"
|
||||
MOTD_DISABLE=""
|
||||
EOF
|
||||
|
||||
# setting window title for remote sessions
|
||||
install -m 755 $SRC/lib/scripts/ssh-title.sh $destination/etc/profile.d/ssh-title.sh
|
||||
|
||||
|
||||
@ -1,5 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
THIS_SCRIPT="header"
|
||||
MOTD_DISABLE=""
|
||||
|
||||
[[ -f /etc/default/armbian-motd ]] && . /etc/default/armbian-motd
|
||||
|
||||
for f in $MOTD_DISABLE; do
|
||||
[[ $f == $THIS_SCRIPT ]] && exit 0
|
||||
done
|
||||
|
||||
. /etc/os-release
|
||||
. /etc/armbian-release
|
||||
|
||||
|
||||
@ -3,6 +3,15 @@
|
||||
# 30-sysinfo - generate the system information
|
||||
# Copyright (c) 2015 Igor Pecovnik
|
||||
|
||||
THIS_SCRIPT="sysinfo"
|
||||
MOTD_DISABLE=""
|
||||
|
||||
[[ -f /etc/default/armbian-motd ]] && . /etc/default/armbian-motd
|
||||
|
||||
for f in $MOTD_DISABLE; do
|
||||
[[ $f == $THIS_SCRIPT ]] && exit 0
|
||||
done
|
||||
|
||||
# define which hard drive you want to monitor
|
||||
storage=/dev/sda1
|
||||
|
||||
|
||||
@ -1,5 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
THIS_SCRIPT="tips"
|
||||
MOTD_DISABLE=""
|
||||
|
||||
[[ -f /etc/default/armbian-motd ]] && . /etc/default/armbian-motd
|
||||
|
||||
for f in $MOTD_DISABLE; do
|
||||
[[ $f == $THIS_SCRIPT ]] && exit 0
|
||||
done
|
||||
|
||||
quotes="/etc/update-motd.d/quotes.txt"
|
||||
if [[ -f $quotes ]]; then
|
||||
|
||||
@ -1,5 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
THIS_SCRIPT="updates"
|
||||
MOTD_DISABLE=""
|
||||
|
||||
[[ -f /etc/default/armbian-motd ]] && . /etc/default/armbian-motd
|
||||
|
||||
for f in $MOTD_DISABLE; do
|
||||
[[ $f == $THIS_SCRIPT ]] && exit 0
|
||||
done
|
||||
|
||||
NUM_UPDATES=0
|
||||
|
||||
[[ -f /var/cache/apt/archives/updates.number ]] && . /var/cache/apt/archives/updates.number
|
||||
|
||||
Loading…
Reference in New Issue
Block a user