Changes

Jump to: navigation, search

Pidora-Headless-Mode

1,647 bytes added, 15:12, 24 May 2013
no edit summary
[https://github.com/ctyler/ip-info/blob/master/README.md More information about ip-read and ip-flash]
 
== Headless Mode Script Update ==
Initially there were a few issues with dchp and headless mode since our release the headless script has been updated. It has not been officially added to the updates repo yet but, if you are interested in trying this mode out now you can copy and replace the old headon script with the updated one located at /usr/bin/headon
 
#!/bin/bash
headless=`ls /boot/headless* 2> /dev/null | head -n 1`
echo "Headless Mode Enabled"
if [ -e "$headless" ]
then
systemctl enable sshd.service
systemctl start sshd.service
systemctl stop firstboot-graphical.service
systemctl disable firstboot-graphical.service
headtext=`grep '[0-9]' "$headless"`
if [ "$headtext" != "" ]
then
ip_address=$(sed -n 's/IPADDR=//p' $headless)
ip_netmask=$(sed -n 's/NETMASK=//p' $headless)
ip_gateway=$(sed -n 's/GATEWAY=//p' $headless)
cat << EOF > /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
IPADDR=$ip_address
NETMASK=$ip_netmask
GATEWAY=$ip_gateway
BOOTPROTO=static
ONBOOT=yes
NM_CONTROLLED=yes
EOF
systemctl restart NetworkManager.service
else
cat << EOF > /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
NM_CONTROLLED=yes
EOF
fi
else
systemctl stop headless-mode.service
systemctl disable headless-mode.service
fi
#read ip address
systemctl enable ip-read.service
#flashing ip address
systemctl enable ip-flash.service
1
edit

Navigation menu