From 4b6a927d8788700426d299823ca1b03a950dca92 Mon Sep 17 00:00:00 2001 From: Hyacinthe Cartiaux Date: Sun, 6 Oct 2024 23:14:31 +0200 Subject: [PATCH 1/2] fix(openbsd): remove rc_bg="YES" in the sysv init scripts --- sysvinit/openbsd/cloudconfig.tmpl | 1 - sysvinit/openbsd/cloudfinal.tmpl | 1 - sysvinit/openbsd/cloudinit.tmpl | 1 - sysvinit/openbsd/cloudinitlocal.tmpl | 1 - 4 files changed, 4 deletions(-) diff --git a/sysvinit/openbsd/cloudconfig.tmpl b/sysvinit/openbsd/cloudconfig.tmpl index 29c324eb7c9..36f9ac49f98 100755 --- a/sysvinit/openbsd/cloudconfig.tmpl +++ b/sysvinit/openbsd/cloudconfig.tmpl @@ -13,7 +13,6 @@ daemon_user=root . /etc/rc.d/rc.subr -rc_bg="YES" # (undefined or "YES") rc_usercheck="YES" # (undefined or "NO") rc_start() { diff --git a/sysvinit/openbsd/cloudfinal.tmpl b/sysvinit/openbsd/cloudfinal.tmpl index 3a2ced806ad..d8f41635cfa 100755 --- a/sysvinit/openbsd/cloudfinal.tmpl +++ b/sysvinit/openbsd/cloudfinal.tmpl @@ -11,7 +11,6 @@ daemon_user=root . /etc/rc.d/rc.subr -rc_bg="YES" # (undefined or "YES") rc_usercheck="YES" # (undefined or "NO") rc_start() { diff --git a/sysvinit/openbsd/cloudinit.tmpl b/sysvinit/openbsd/cloudinit.tmpl index f8b95e162b0..b4bbb9ed0a8 100755 --- a/sysvinit/openbsd/cloudinit.tmpl +++ b/sysvinit/openbsd/cloudinit.tmpl @@ -11,7 +11,6 @@ daemon_user=root . /etc/rc.d/rc.subr -rc_bg="YES" # (undefined or "YES") rc_usercheck="YES" # (undefined or "NO") rc_start() { diff --git a/sysvinit/openbsd/cloudinitlocal.tmpl b/sysvinit/openbsd/cloudinitlocal.tmpl index c58eb97561f..b88bdf4788b 100755 --- a/sysvinit/openbsd/cloudinitlocal.tmpl +++ b/sysvinit/openbsd/cloudinitlocal.tmpl @@ -14,7 +14,6 @@ daemon_user=root . /etc/rc.d/rc.subr -rc_bg="YES" # (undefined or "YES") rc_usercheck="YES" rc_start() { From 7147c76e068c8e4df9a835c7c982cdea93a08212 Mon Sep 17 00:00:00 2001 From: Hyacinthe Cartiaux Date: Sun, 6 Oct 2024 23:19:37 +0200 Subject: [PATCH 2/2] fix(openbsd): do not rely on rc.local, use the sysv init scripts --- tools/build-on-openbsd | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/tools/build-on-openbsd b/tools/build-on-openbsd index 60a5fa565a5..94c66dd1744 100755 --- a/tools/build-on-openbsd +++ b/tools/build-on-openbsd @@ -43,24 +43,9 @@ else python3 setup.py install -O1 --distro openbsd --skip-build --init-system sysvinit_openbsd echo "Installation completed." - RC_LOCAL="/etc/rc.local" - RC_LOCAL_CONTENT=" -rm -rf /var/run/cloud-init -/usr/local/lib/cloud-init/ds-identify - -cloud-init init --local - -cloud-init init - -cloud-init modules --mode config - -cloud-init modules --mode final -" - if ! test -e $RC_LOCAL; then - echo "export PATH=$PATH:/usr/local/sbin:/usr/local/bin" >> $RC_LOCAL - echo "$RC_LOCAL_CONTENT" >> $RC_LOCAL - elif ! grep -Fq "cloud-init" $RC_LOCAL; then - echo "$RC_LOCAL_CONTENT" >> $RC_LOCAL - fi + rcctl enable cloudinitlocal + rcctl enable cloudinit + rcctl enable cloudconfig + rcctl enable cloudfinal fi