Added info MOTD
This commit is contained in:
parent
81ffb7197b
commit
6823d8712a
|
@ -91,15 +91,43 @@ ExecStartPost=/bin/systemctl disable regenerate_ssh_host_keys
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
|
SSH_STATUS="on"
|
||||||
[ -e ${CHROOT}/etc/systemd/system/multi-user.target.wants/regenerate_ssh_host_keys.service ] || ln -s ../regenerate_ssh_host_keys.service ${CHROOT}/etc/systemd/system/multi-user.target.wants/regenerate_ssh_host_keys.service
|
[ -e ${CHROOT}/etc/systemd/system/multi-user.target.wants/regenerate_ssh_host_keys.service ] || ln -s ../regenerate_ssh_host_keys.service ${CHROOT}/etc/systemd/system/multi-user.target.wants/regenerate_ssh_host_keys.service
|
||||||
|
else
|
||||||
|
SSH_STATUS="off"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#final changes
|
#final changes
|
||||||
echo "${LIVE_HOSTNAME}" > $CHROOT/etc/hostname
|
echo "${LIVE_HOSTNAME}" > $CHROOT/etc/hostname
|
||||||
echo "${LIVE_NAME} Build@${BUILD_TIME} \\l" > $CHROOT/etc/issue
|
echo "${LIVE_NAME} Build@${BUILD_TIME} \\l" > $CHROOT/etc/issue
|
||||||
echo "${LIVE_NAME} Build@${BUILD_TIME}" > $CHROOT/etc/issue.net
|
echo "${LIVE_NAME} Build@${BUILD_TIME}" > $CHROOT/etc/issue.net
|
||||||
echo "" >> $CHROOT/etc/legal
|
echo "" > $CHROOT/etc/legal
|
||||||
|
|
||||||
|
|
||||||
|
cat > ${CHROOT}/etc/update-motd.d/01-info << EOF
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo -e "\n===== GENERAL =====\n"
|
||||||
|
echo " Systemname: ${LIVE_NAME}"
|
||||||
|
echo " Buildtime: ${BUILD_TIME}"
|
||||||
|
echo " Root password: ${LIVE_ROOTPW}"
|
||||||
|
echo " SSH: ${SSH_STATUS}"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
echo -e "\n====== NETWORK ======\n"
|
||||||
|
echo " Interfaces:"
|
||||||
|
ip -c -br addr | grep -v lo | sed -r 's/^(.*)$/ \1/g'
|
||||||
|
echo -e "\n Default route: "
|
||||||
|
ip -c -br route show default | awk '{print " "\$3"\t("\$5")"}'
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
#Diskingo
|
||||||
|
echo -e "\n====== DISKS ======\n"
|
||||||
|
lsblk -e 7,11 -o NAME,SIZE,TYPE,FSTYPE,SERIAL,MODEL | sed -r -e 's/^(.*)$/ \1/g' -e 's/([A-Za-z0-9]) /\1 /g'
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chmod +x ${CHROOT}/etc/update-motd.d/01-info
|
||||||
|
|
||||||
endstage bootstrap
|
endstage bootstrap
|
||||||
|
|
Loading…
Reference in New Issue