Blame 0057-02caps-do-not-create-bin-sh-link.patch

Harald Hoyer 89b080
From d6e8280cd83a08f1b224fa4745de4e3b6f5baa4c Mon Sep 17 00:00:00 2001
Harald Hoyer 89b080
From: Dave Young <dyoung@redhat.com>
Harald Hoyer 89b080
Date: Mon, 9 Jul 2012 14:57:11 +0800
Harald Hoyer 89b080
Subject: [PATCH] 02caps: do not create /bin/sh link
Harald Hoyer 89b080
Harald Hoyer 89b080
02caps: do not create /bin/sh link
Harald Hoyer 89b080
Harald Hoyer 89b080
caps.sh use !/bin/bash explictly, so no need to ln -sf bash /bin/sh
Harald Hoyer 89b080
Harald Hoyer 89b080
OTOH, 00dash will create the symlink /bin/sh, 99base will create it if
Harald Hoyer 89b080
there's no /bin/sh symlink. It looks bad to creat /bin/sh in other modules.
Harald Hoyer 89b080
Harald Hoyer 89b080
If a script want to use bash as command interpreter it should use !/bin/bash
Harald Hoyer 89b080
or !/bin/sh in case dash is not installed.
Harald Hoyer 89b080
Harald Hoyer 89b080
Signed-off-by: Dave Young <dyoung@redhat.com>
Harald Hoyer 89b080
---
Harald Hoyer 89b080
 modules.d/02caps/module-setup.sh |    2 +-
Harald Hoyer 89b080
 1 file changed, 1 insertion(+), 1 deletion(-)
Harald Hoyer 89b080
Harald Hoyer 89b080
diff --git a/modules.d/02caps/module-setup.sh b/modules.d/02caps/module-setup.sh
Harald Hoyer 89b080
index 6ecb231..c9d94ee 100755
Harald Hoyer 89b080
--- a/modules.d/02caps/module-setup.sh
Harald Hoyer 89b080
+++ b/modules.d/02caps/module-setup.sh
Harald Hoyer 89b080
@@ -14,6 +14,6 @@ install() {
Harald Hoyer 89b080
     inst_hook pre-pivot 00 "$moddir/caps.sh"
Harald Hoyer 89b080
     inst $(type -P capsh 2>/dev/null) /usr/sbin/capsh
Harald Hoyer 89b080
     # capsh wants bash and we need bash also
Harald Hoyer 89b080
-    inst /bin/bash && ln -sf bash "${initdir}/bin/sh"
Harald Hoyer 89b080
+    inst /bin/bash
Harald Hoyer 89b080
 }
Harald Hoyer 89b080