-
Notifications
You must be signed in to change notification settings - Fork 908
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added net/activator for `ifconfig` that is used with OpenBSD * Added sysvinit scripts for OpenBSD * Updated build-on-openbsd tool with additional dependencies and better logic
- Loading branch information
Showing
8 changed files
with
241 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# This file is part of cloud-init. See LICENSE file for license information. | ||
|
||
import logging | ||
|
||
from cloudinit import subp | ||
|
||
LOG = logging.getLogger(__name__) | ||
|
||
|
||
def available(target=None): | ||
expected = "ifconfig" | ||
search = ["/sbin"] | ||
return subp.which(expected, search=search, target=target) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
## template:jinja | ||
#!/bin/ksh | ||
|
||
# PROVIDE: cloudconfig | ||
# REQUIRE: cloudinit | ||
# BEFORE: sshd | ||
|
||
|
||
daemon="cloud-init" | ||
daemon_execdir="{{prefix}}/bin" | ||
daemon_flags="modules --mode config" | ||
daemon_rtable=0 | ||
daemon_timeout=1 | ||
daemon_user=root | ||
|
||
. /etc/rc.d/rc.subr | ||
|
||
rc_bg="YES" # (undefined or "YES") | ||
rc_usercheck="YES" # (undefined or "NO") | ||
|
||
rc_start() { | ||
if test -e /etc/cloud/cloud-init.disabled; then | ||
echo -n "cloud-init is disabled via cloud-init.disabled file." | logger -t ${daemon} | ||
else | ||
echo -n "Starting..." | logger -t ${daemon} | ||
rc_exec "${daemon_execdir}/${daemon} ${daemon_flags}" | ||
fi | ||
} | ||
|
||
rc_check() { | ||
pgrep -f "${daemon}" >/dev/null | ||
} | ||
|
||
rc_stop() { | ||
echo -n "Stopping..." | logger -t ${daemon} | ||
pkill -f "${daemon}" >/dev/null | ||
} | ||
|
||
rc_cmd "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
## template:jinja | ||
#!/bin/ksh | ||
|
||
# PROVIDE: cloudfinal | ||
# REQUIRE: LOGIN cloudconfig | ||
|
||
daemon="cloud-init" | ||
daemon_execdir="{{prefix}}/bin" | ||
daemon_flags="modules --mode final" | ||
daemon_rtable=0 | ||
daemon_timeout=1 | ||
daemon_user=root | ||
|
||
. /etc/rc.d/rc.subr | ||
|
||
rc_bg="YES" # (undefined or "YES") | ||
rc_usercheck="YES" # (undefined or "NO") | ||
|
||
rc_start() { | ||
if test -e /etc/cloud/cloud-init.disabled; then | ||
echo -n "cloud-init is disabled via cloud-init.disabled file." | logger -t ${daemon} | ||
else | ||
echo -n "Starting..." | logger -t ${daemon} | ||
rc_exec "${daemon_execdir}/${daemon} ${daemon_flags}" | ||
fi | ||
} | ||
|
||
rc_check() { | ||
pgrep -f "${daemon}" >/dev/null | ||
} | ||
|
||
rc_stop() { | ||
echo -n "Stopping..." | logger -t ${daemon} | ||
pkill -f "${daemon}" >/dev/null | ||
} | ||
|
||
rc_cmd "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
## template:jinja | ||
#!/bin/ksh | ||
|
||
# PROVIDE: cloudinit | ||
# REQUIRE: cloudinitlocal | ||
|
||
daemon="cloud-init" | ||
daemon_execdir="{{prefix}}/bin" | ||
daemon_flags="init" | ||
daemon_rtable=0 | ||
daemon_timeout=1 | ||
daemon_user=root | ||
|
||
. /etc/rc.d/rc.subr | ||
|
||
rc_bg="YES" # (undefined or "YES") | ||
rc_usercheck="YES" # (undefined or "NO") | ||
|
||
rc_start() { | ||
if test -e /etc/cloud/cloud-init.disabled; then | ||
echo -n "cloud-init is disabled via cloud-init.disabled file." | logger -t ${daemon} | ||
else | ||
echo -n "Starting..." | logger -t ${daemon} | ||
rc_exec "${daemon_execdir}/${daemon} ${daemon_flags}" | ||
fi | ||
} | ||
|
||
rc_check() { | ||
pgrep -f "${daemon}" >/dev/null | ||
} | ||
|
||
rc_stop() { | ||
echo -n "Stopping..." | logger -t ${daemon} | ||
pkill -f "${daemon}" >/dev/null | ||
} | ||
|
||
rc_cmd "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
## template:jinja | ||
#!/bin/ksh | ||
|
||
# PROVIDE: cloudinitlocal | ||
# REQUIRE: NETWORKING | ||
|
||
# After NETWORKING because we don't want staticroute to wipe | ||
# the route set by the DHCP client toward the meta-data server. | ||
|
||
daemon="cloud-init" | ||
daemon_execdir="{{prefix}}/bin" | ||
daemon_flags="init -l" | ||
daemon_rtable=0 | ||
daemon_timeout=1 | ||
daemon_user=root | ||
|
||
. /etc/rc.d/rc.subr | ||
|
||
rc_bg="YES" # (undefined or "YES") | ||
rc_usercheck="YES" | ||
|
||
rc_start() { | ||
if test -e /etc/cloud/cloud-init.disabled; then | ||
echo -n "cloud-init is disabled via cloud-init.disabled file." | logger -t ${daemon} | ||
else | ||
echo -n "Starting..." | logger -t ${daemon} | ||
rc_exec "${daemon_execdir}/${daemon} ${daemon_flags}" | ||
fi | ||
} | ||
|
||
rc_check() { | ||
pgrep -f "${daemon}" >/dev/null | ||
} | ||
|
||
rc_stop() { | ||
echo -n "Stopping..." | logger -t ${daemon} | ||
pkill -f "${daemon}" >/dev/null | ||
} | ||
|
||
rc_cmd "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters