a33ddb89f1
If you don't want cloud-init, you may need to get a few things from config-drive because you may be operating on a cloud with no DHCP. In that case, simply reading some values from config-drive and writing out either DHCP or static network info, in addition to grabbing ssh keys is helpful. Both Infra and bifrost want this for their images. Co-Authored-By: Gregory Haynes <greg@greghaynes.net> Change-Id: I2746ed256b9783eab058b803130d3ccac484eaeb
32 lines
656 B
Bash
Executable File
32 lines
656 B
Bash
Executable File
#!/bin/sh -e
|
|
### BEGIN INIT INFO
|
|
# Provides: simple-init
|
|
# Required-Start: $local_fs
|
|
# Required-Stop: $local_fs
|
|
# Default-Start: S
|
|
# Default-Stop: 0 6
|
|
# X-Start-Before: networking
|
|
# Short-Description: Autodetect network interfaces
|
|
# Description: Autodetect network interfaces during boot and configure them for DHCP
|
|
### END INIT INFO
|
|
|
|
NAME=simple-init
|
|
INIT_NAME=/etc/init.d/${NAME}
|
|
SCRIPT_NAME=/usr/local/sbin/${NAME}.sh
|
|
|
|
[ -x $SCRIPT_NAME ] || exit 0
|
|
|
|
case "$1" in
|
|
start)
|
|
$SCRIPT_NAME
|
|
;;
|
|
stop)
|
|
;;
|
|
*)
|
|
echo "Usage: $INIT_NAME {start|stop}"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
exit 0
|