pre-upgrade (340B)
1 #!/bin/sh 2 # Winchester's init.conf: its host name to /etc/hostname, the rest is read by post-upgrade 3 [ -f /etc/init.conf ] || exit 0 4 h=$(sed -n 's/^hostname *= *//p' /etc/init.conf) 5 [ -n "$h" ] && { [ ! -s /etc/hostname ] || [ "$(cat /etc/hostname)" = localhost ]; } && echo "$h" > /etc/hostname 6 cp /etc/init.conf /etc/init.conf.old 7 exit 0