From 9f8f9ce4992f4775cb3f1a22c50499663b12c0dc Mon Sep 17 00:00:00 2001 From: Cem Keylan Date: Mon, 10 Jan 2022 17:28:04 +0300 Subject: carbs-init: apply patch --- core/carbs-init/patches/fd.patch | 13 +++++++++++++ core/carbs-init/patches/respawn-fix.patch | 28 ++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 core/carbs-init/patches/fd.patch create mode 100644 core/carbs-init/patches/respawn-fix.patch (limited to 'core/carbs-init/patches') diff --git a/core/carbs-init/patches/fd.patch b/core/carbs-init/patches/fd.patch new file mode 100644 index 00000000..ff5af2da --- /dev/null +++ b/core/carbs-init/patches/fd.patch @@ -0,0 +1,13 @@ +diff --git a/rc.boot b/rc.boot +index 49d7fa5..ba5d3dd 100755 +--- a/rc.boot ++++ b/rc.boot +@@ -27,7 +27,7 @@ out "Mounting pseudo filesystems..."; { + mnt mode=1777,nosuid,nodev tmpfs shm /dev/shm + + { +- ln -sf /proc/self/fs /dev/fd ++ ln -sf /proc/self/fd /dev/fd + ln -sf fd/0 /dev/stdin + ln -sf fd/1 /dev/stdout + ln -sf fd/2 /dev/stderr diff --git a/core/carbs-init/patches/respawn-fix.patch b/core/carbs-init/patches/respawn-fix.patch new file mode 100644 index 00000000..12761e89 --- /dev/null +++ b/core/carbs-init/patches/respawn-fix.patch @@ -0,0 +1,28 @@ +From cab27917dc954294e92c3979570841b85f67619d Mon Sep 17 00:00:00 2001 +From: Cem Keylan +Date: Thu, 17 Sep 2020 00:14:49 +0300 +Subject: [PATCH] respawn: handle errors + +--- + contrib/respawn | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/contrib/respawn b/contrib/respawn +index 1b914ea..4126cdb 100644 +--- a/contrib/respawn ++++ b/contrib/respawn +@@ -18,6 +18,10 @@ case "$1" in + esac + + while :; do +- "$@" ++ "$@" || err=$? ++ case $err in ++ # Usually Ctrl+C interrupt. ++ 12[7-9]|130) exit 0 ++ esac + [ "$delay" ] && sleep "$delay" + done +-- +2.28.0 + -- cgit v1.2.3