From 6a10b8b5d1c8c9bc334e491d78766b50c5ed6b34 Mon Sep 17 00:00:00 2001 From: Jim Perrin Date: Oct 11 2014 15:45:07 +0000 Subject: kickstart update --- diff --git a/kickstarts/centos-7-EasyDocker.cfg b/kickstarts/centos-7-EasyDocker.cfg index e0fd17b..1a73113 100644 --- a/kickstarts/centos-7-EasyDocker.cfg +++ b/kickstarts/centos-7-EasyDocker.cfg @@ -41,7 +41,7 @@ shim %end %post - +# Make docker listen to the world mkdir -p /etc/systemd/system/docker.service.d/ cat > /etc/systemd/system/docker.service.d/startup.conf << EOF [Service] @@ -50,6 +50,34 @@ ExecStart=/usr/bin/docker -d --selinux-enabled -H tcp://0.0.0.0:2375 -H unix:/// EOF +# Autologin +rm /etc/systemd/system/getty.target.wants/getty@tty1.service +cp /lib/systemd/system/getty@.service /etc/systemd/system/getty@tty1.service + +sed -i "s|ExecStart.*|ExecStart=-/sbin/agetty --autologin root --noclear %I|g" /etc/systemd/system/getty@tty1.service +sed -i "/After/Wants=network.target/i" /etc/systemd/system/getty@tty1.service +cat >> /etc/systemd/system/getty@tty1.service << EOF +;Alias=getty@tty1.service + +EOF + +ln -s /etc/systemd/system/getty@tty1.service /etc/systemd/system/getty.target.wants/getty@tty1.service + + +cat > /etc/profile.d/hostinfo.sh << EOF +#!/bin/bash +sleep 5 +IP=\$(ip route get 1.2.3.4 | awk -F'src' '{print\$2}'| sed 's/^[ \t]*//;s/[ \t]*$//') +echo "###################################################" +echo "" +echo "A web browser is the preferred method to use image" +echo "Please visit http://\${IP}:9090 to log in" +echo "Username: root" +echo "There is no password" +echo "" +echo "###################################################" +EOF +chmod 755 /etc/profile.d/hostinfo.sh # FIXME: it'd be better to get this installed from a package cat > /etc/rc.d/init.d/livesys << EOF