Skip to content

Instantly share code, notes, and snippets.

View dweeber's full-sized avatar

Kevin Reed dweeber

  • TNET Services Inc
  • Mesa AZ
View GitHub Profile
@dweeber
dweeber / hostname.sh
Created November 1, 2012 11:19
Replacement /etc/init.d/hostname.sh to provide for auto changing hosts hostname
#! /bin/sh
### BEGIN INIT INFO
# Provides: hostname
# Required-Start:
# Required-Stop:
# Should-Start: glibc
# Default-Start: S
# Default-Stop:
# Short-Description: Set hostname based on /etc/hostname
# Description: Read the machines hostname from /etc/hostname, and
@dweeber
dweeber / anewhost.sh
Created November 2, 2012 01:40
Script to change /etc/hosts and /etc/hostname if /boot/newhost is found
#! /bin/sh
### BEGIN INIT INFO
# Provides: anewhost.sh
# Required-Start:
# Required-Stop:
# Should-Start:
# Default-Start: S
# Default-Stop:
# Short-Description: Changes /etc/hostname /etc/hosts if /boot/newhost found
# Description: /boot/newhost file to change the
@dweeber
dweeber / gist:4055331
Created November 11, 2012 15:58
Set RPI hostname based on /boot/serial_hostname.txt file
#! /bin/sh
### BEGIN INIT INFO
# Provides: serial_hostname
# Required-Start: $local_fs
# Required-Stop:
# X-Start-Before hostname
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Set hostname based on /boot/serial_hostname.txt
# Description: Read the machines hostname from /boot/serial_hostname.txt,