janus57
11/01/2016, 19h58

c'est ça, par défaut c'est vide.
Cordialement, janus57
# By default this script does nothing.
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
true > /etc/motd
if [ -e /etc/lsb-release ]
then
. /etc/lsb-release
[ -n "${DISTRIB_DESCRIPTION}" ] && echo "${DISTRIB_DESCRIPTION}" > /etc/motd
fi
uname -a >> /etc/motd
echo >> /etc/motd
echo "server : `cat /root/.mdg 2>/dev/null`" >> /etc/motd
echo "ip : `cat /etc/network/interfaces | grep "address" | head -n 1 | cut -f 2 -d " "`" >> /etc/motd
echo "hostname : `hostname`" >> /etc/motd
echo >> /etc/motd
/bin/cp /etc/motd /etc/issue
#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. exit 0
# # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing.
true > /etc/motd echo "Debian GNU/Linux $(cat /etc/debian_version)"> /etc/motd echo >> /etc/motd uname -a >> /etc/motd echo >> /etc/motd echo "server : `cat /root/.mdg 2>/dev/null`" >> /etc/motd echo "hostname : `hostname`" >> /etc/motd # # search interfaces that are connected # for net_interface in `ip link show | grep eth | grep UP | awk {'print $2'} | sed 's/://g'` do # IPv4 for IPV4 in `ip addr show ${net_interface} | grep 'inet .*\/' | awk {'print $2'}| grep -Eo '[[:digit:]]{1,3}(\.[[:digit:]]{1,3}){3}'` do echo "${net_interface} IPv4 : ${IPV4}" >> /etc/motd done #IPv6 for IPV6 in `ip -6 addr show ${net_interface} | grep 'inet6' | awk {'print $2'}` do if [[ "${IPV6}" =~ ^fe80.* ]]; then echo " ... Link-Local-Adresse IPv6" else echo "${net_interface} IPv6 : ${IPV6}" >> /etc/motd fi done done
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
true > /etc/motd
if [ -e /etc/lsb-release ]
then
. /etc/lsb-release
[ -n "${DISTRIB_DESCRIPTION}" ] && echo "${DISTRIB_DESCRIPTION}" > /etc/motd
fi
uname -a >> /etc/motd
echo >> /etc/motd
echo "server : `cat /root/.mdg 2>/dev/null`" >> /etc/motd
echo "ip : `cat /etc/network/interfaces | grep "address" | head -n 1 | cut -f 2 -d " "`" >> /etc/motd
echo "hostname : `hostname`" >> /etc/motd
echo >> /etc/motd
/bin/cp /etc/motd /etc/issue
exit 0