bash: Add bash-sh package to switch /bin/sh to /bin/bash
authorStefan Schmidt <stefan@buglabs.net>
Fri, 18 Feb 2011 10:26:48 +0000 (11:26 +0100)
committerStefan Schmidt <stefan@buglabs.net>
Fri, 18 Feb 2011 10:55:36 +0000 (11:55 +0100)
An old change from hrw in the BugLabs repo I forgot to bring over earlier.

recipes/bash/bash.inc
recipes/bash/bash_3.0.bb
recipes/bash/bash_3.2.bb

index 239ddd1..99c6398 100644 (file)
@@ -33,3 +33,16 @@ pkg_postinst () {
        grep -q "bin/bash" $D${sysconfdir}/shells || echo /bin/bash >> $D${sysconfdir}/shells
        grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells
 }
+
+PACKAGES += "bash-sh"
+RDEPENDS_bash-sh = "bash"
+
+ALLOW_EMPTY_bash-sh = "1"
+
+pkg_postinst_bash-sh() {
+       cd $D/bin && ln -sf bash sh
+}
+
+pkg_postrm_bash-sh() {
+       ln -sf /bin/busybox /bin/sh
+}
index 60e6707..ec0510e 100644 (file)
@@ -1,5 +1,5 @@
 require bash.inc
-PR = "r13"
+PR = "r14"
 
 SRC_URI += "\
   file://bash-3.0-fixes.patch \
index 5a41882..4758a4f 100644 (file)
@@ -1,6 +1,6 @@
 require bash.inc
 
-PR = "r11"
+PR = "r12"
 
 SRC_URI += "\
            file://builtins.patch \