]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
bash: Fix startfiles.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 13 Nov 2012 21:27:49 +0000 (22:27 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 13 Nov 2012 21:27:49 +0000 (22:27 +0100)
Sanitize PATH variable and fix wrong path to hostname command.

config/etc/profile
lfs/bash
src/patches/bash-4.0-paths-1.patch [new file with mode: 0644]
src/patches/bash-4.0-profile-1.patch [new file with mode: 0644]

index cc638788aff995adf665048780637e7db35e1ead..912d3d0b9154fe1a74413569fc5a49676b2c93c6 100644 (file)
@@ -42,7 +42,7 @@ else
     pathmunge /usr/sbin after
 fi
 
-HOSTNAME=`/usr/bin/hostname 2>/dev/null`
+HOSTNAME=`/bin/hostname 2>/dev/null`
 HISTSIZE=1000
 if [ "$HISTCONTROL" = "ignorespace" ] ; then
     export HISTCONTROL=ignoreboth
index 34bf0753392331f2790b63aa3991f8957c36c265..4fef89e9b88c45214ea3804e999e84f8a9ef962e 100644 (file)
--- a/lfs/bash
+++ b/lfs/bash
@@ -93,6 +93,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
                cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/bash/bash32-$$(printf "%03d" "$${i}") || exit 1; \
        done
 
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/bash-4.0-paths-1.patch
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/bash-4.0-profile-1.patch
        cd $(DIR_APP) && ./configure $(EXTRA_CONFIG)
        cd $(DIR_APP) && make $(EXTRA_MAKE)
        cd $(DIR_APP) && make $(EXTRA_INSTALL) install
diff --git a/src/patches/bash-4.0-paths-1.patch b/src/patches/bash-4.0-paths-1.patch
new file mode 100644 (file)
index 0000000..735a381
--- /dev/null
@@ -0,0 +1,30 @@
+--- bash-3.0/config.h.in.paths 2004-07-21 21:08:31.000000000 +0100
++++ bash-3.0/config.h.in       2004-07-28 09:16:27.257884999 +0100
+@@ -197,7 +197,7 @@
+ /* System paths */
+-#define DEFAULT_MAIL_DIRECTORY "/usr/spool/mail"
++#define DEFAULT_MAIL_DIRECTORY "/var/spool/mail"
+ /* Characteristics of the system's header files and libraries that affect
+    the compilation environment. */
+--- bash-3.0/config-top.h.paths        2003-08-05 15:36:12.000000000 +0100
++++ bash-3.0/config-top.h      2004-07-28 09:36:27.117205637 +0100
+@@ -52,14 +52,14 @@
+ /* The default value of the PATH variable. */
+ #ifndef DEFAULT_PATH_VALUE
+ #define DEFAULT_PATH_VALUE \
+-  "/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:."
++  "/usr/local/bin:/bin:/usr/bin"
+ #endif
+ /* The value for PATH when invoking `command -p'.  This is only used when
+    the Posix.2 confstr () function, or CS_PATH define are not present. */
+ #ifndef STANDARD_UTILS_PATH
+ #define STANDARD_UTILS_PATH \
+-  "/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc"
++  "/bin:/usr/bin:/usr/sbin:/sbin"
+ #endif
+ /* Default primary and secondary prompt strings. */
diff --git a/src/patches/bash-4.0-profile-1.patch b/src/patches/bash-4.0-profile-1.patch
new file mode 100644 (file)
index 0000000..ba3344b
--- /dev/null
@@ -0,0 +1,12 @@
+diff -up bash-3.2/config-top.h.profile bash-3.2/config-top.h
+--- bash-3.2/config-top.h.profile      2008-07-17 13:35:39.000000000 +0200
++++ bash-3.2/config-top.h      2008-07-17 13:42:18.000000000 +0200
+@@ -26,6 +26,8 @@
+    what POSIX.2 specifies. */
+ #define CONTINUE_AFTER_KILL_ERROR
++#define NON_INTERACTIVE_LOGIN_SHELLS
++
+ /* Define BREAK_COMPLAINS if you want the non-standard, but useful
+    error messages about `break' and `continue' out of context. */
+ #define BREAK_COMPLAINS