Files
DetectionLab/ESXi/Packer/_common/motd.sh
2020-03-09 14:42:58 -07:00

22 lines
374 B
Bash

#!/bin/sh -eux
bento='
This system is built by the Bento project by Chef Software
More information can be found at https://github.com/chef/bento'
if [ -d /etc/update-motd.d ]; then
MOTD_CONFIG='/etc/update-motd.d/99-bento'
cat >> "$MOTD_CONFIG" <<BENTO
#!/bin/sh
cat <<'EOF'
$bento
EOF
BENTO
chmod 0755 "$MOTD_CONFIG"
else
echo "$bento" >> /etc/motd
fi