File sysconfig-Disabled-bash-posix-mode-to-allow-bash-features.patch of Package sysconfig
From c265172782898a6922b92b3659cf7b1d5231cfd1 Mon Sep 17 00:00:00 2001
From: Marius Tomaschewski <mt@suse.com>
Date: Mon, 9 Jan 2012 19:56:52 +0100
Subject: [PATCH] Disabled bash posix mode to allow bash features
Signed-off-by: Marius Tomaschewski <mt@suse.com>
---
scripts/convert_to_netconfig_dns | 2 ++
scripts/convert_to_netconfig_nis | 2 ++
scripts/functions.rpm-utils | 2 ++
scripts/ifdown-connection | 2 ++
scripts/ifup | 2 ++
scripts/ifup-802.1q | 2 ++
scripts/ifup-autoip | 2 ++
scripts/ifup-bonding | 2 ++
scripts/ifup-bridge | 3 +++
scripts/ifup-dhcp | 2 ++
scripts/ifup-infiniband | 2 ++
scripts/ifup-ppp | 2 ++
scripts/ifup-route | 2 ++
scripts/ifup-services | 2 ++
scripts/ifup-skel | 2 ++
scripts/ifup-tunnel | 2 ++
scripts/ifup-wireless | 2 ++
scripts/ip-up | 2 ++
scripts/netconfig | 1 +
scripts/netconfig.d/dns-bind | 2 ++
scripts/netconfig.d/dns-dnsmasq | 2 ++
scripts/netconfig.d/dns-resolver | 2 ++
scripts/netconfig.d/nis | 2 ++
scripts/netconfig.d/ntp-runtime | 2 ++
scripts/network | 2 ++
scripts/network-remotefs | 2 ++
29 files changed, 59 insertions(+), 0 deletions(-)
diff --git a/scripts/convert_to_netconfig_dns b/scripts/convert_to_netconfig_dns
index 04a7260..7cc6e84 100644
--- a/scripts/convert_to_netconfig_dns
+++ b/scripts/convert_to_netconfig_dns
@@ -5,6 +5,8 @@
# - 1 on failure
###
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
+
test "${DEBUG}" = yes && set -x
# helper functions
diff --git a/scripts/convert_to_netconfig_nis b/scripts/convert_to_netconfig_nis
index 5c46eb5..f7e7571 100644
--- a/scripts/convert_to_netconfig_nis
+++ b/scripts/convert_to_netconfig_nis
@@ -5,6 +5,8 @@
# - 1 on failure
###
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
+
test "${DEBUG}" = yes && set -x
# helper functions
diff --git a/scripts/functions.rpm-utils b/scripts/functions.rpm-utils
index 7b41018..7742a1e 100644
--- a/scripts/functions.rpm-utils
+++ b/scripts/functions.rpm-utils
@@ -1,5 +1,7 @@
#!/bin/bash
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
+
# similar to remove_and_set rpm suse macro,
# but more flexible and able to handle files
# in subdirs of the etc/sysconfig directory.
diff --git a/scripts/ifdown-connection b/scripts/ifdown-connection
index b1c8e68..4a9a38b 100644
--- a/scripts/ifdown-connection
+++ b/scripts/ifdown-connection
@@ -18,6 +18,8 @@
# $Id$
#
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
+
# TODO:
# when closing first use -TERM (except if we just try with -0)
# for ichecking improve output and remove output from getdests() and nfscheck()
diff --git a/scripts/ifup b/scripts/ifup
index f9b9e43..91bf5a3 100755
--- a/scripts/ifup
+++ b/scripts/ifup
@@ -29,6 +29,8 @@
# $Id$
#
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
+
usage () {
echo $@
echo "Usage: if{up,down,status} [<config>] <interface> [-o <options>]"
diff --git a/scripts/ifup-802.1q b/scripts/ifup-802.1q
index 9bded41..61ec64f 100644
--- a/scripts/ifup-802.1q
+++ b/scripts/ifup-802.1q
@@ -7,6 +7,8 @@
# Marius Tomaschewski <mt@suse.de>, 2007-2009
#
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
+
usage () {
echo $@
echo "Usage: if{up,down}-802.1q [<config>] <interface> [-o <options>]"
diff --git a/scripts/ifup-autoip b/scripts/ifup-autoip
index ecb2e38..b515364 100755
--- a/scripts/ifup-autoip
+++ b/scripts/ifup-autoip
@@ -18,6 +18,8 @@
# Author: Michael Schroeder <mls@suse.de>, 2004
#
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
+
usage () {
echo $@
echo "Usage: if{up,down,status}-autoip [<config>] <interface> [-o <options>]"
diff --git a/scripts/ifup-bonding b/scripts/ifup-bonding
index e9c50c0..ca75d4a 100755
--- a/scripts/ifup-bonding
+++ b/scripts/ifup-bonding
@@ -23,6 +23,8 @@
# $Id$
#
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
+
usage () {
echo $@
echo "Usage: if{up,down,status}-bonding [<config>] <interface> [-o <options>]"
diff --git a/scripts/ifup-bridge b/scripts/ifup-bridge
index 10cf7f2..fa18ae8 100755
--- a/scripts/ifup-bridge
+++ b/scripts/ifup-bridge
@@ -12,6 +12,9 @@
#
# $Id$
#
+
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
+
usage () {
echo $@
echo "usage: if{up,down,status}-bridge [<config>] <interface> [-o <options>]"
diff --git a/scripts/ifup-dhcp b/scripts/ifup-dhcp
index d556c15..c884734 100755
--- a/scripts/ifup-dhcp
+++ b/scripts/ifup-dhcp
@@ -19,6 +19,8 @@
# Peter Poeml <poeml@suse.de>, 2002-2006
#
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
+
usage () {
echo $@
echo "Usage: if{up,down,status}-dhcp [<config>] <interface> [-o <options>]"
diff --git a/scripts/ifup-infiniband b/scripts/ifup-infiniband
index 2e24aac..4476ff5 100755
--- a/scripts/ifup-infiniband
+++ b/scripts/ifup-infiniband
@@ -23,6 +23,8 @@
# $Id$
#
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
+
usage () {
echo $@
echo "Usage: if{up,down,status}-infiniband [<config>] <interface> [-o <options>]"
diff --git a/scripts/ifup-ppp b/scripts/ifup-ppp
index 54250a1..2b9cd60 100755
--- a/scripts/ifup-ppp
+++ b/scripts/ifup-ppp
@@ -23,6 +23,8 @@
# $Id$
#
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
+
function usage()
{
echo $@
diff --git a/scripts/ifup-route b/scripts/ifup-route
index ae8b496..22dd8d9 100755
--- a/scripts/ifup-route
+++ b/scripts/ifup-route
@@ -21,6 +21,8 @@
# $Id$
#
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
+
usage () {
echo $@
echo "Usage: if{up,down,status}-route [<config>] <interface> [-o <options>]"
diff --git a/scripts/ifup-services b/scripts/ifup-services
index 8a3b083..8f06f6c 100755
--- a/scripts/ifup-services
+++ b/scripts/ifup-services
@@ -22,6 +22,8 @@
# $Id$
#
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
+
usage () {
echo $@
echo "Usage: if{up,down,status}-services [<config>] <interface> [-o <options>]"
diff --git a/scripts/ifup-skel b/scripts/ifup-skel
index dc04ab0..f4743eb 100755
--- a/scripts/ifup-skel
+++ b/scripts/ifup-skel
@@ -25,6 +25,8 @@
# $Id$
#
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
+
usage () {
echo $@
echo ""
diff --git a/scripts/ifup-tunnel b/scripts/ifup-tunnel
index 295af49..37e6d51 100755
--- a/scripts/ifup-tunnel
+++ b/scripts/ifup-tunnel
@@ -25,6 +25,8 @@
# $Id$
#
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
+
usage () {
echo $@
echo "Usage: if{up,down,status}-tunnel [<config>] <interface> [-o <options>]"
diff --git a/scripts/ifup-wireless b/scripts/ifup-wireless
index fb0582b..b1e1967 100755
--- a/scripts/ifup-wireless
+++ b/scripts/ifup-wireless
@@ -22,6 +22,8 @@
# $Id$
#
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
+
usage () {
echo $@
echo "Usage: if{up,down,status}-wireless [<config>] <interface> [-o <options>]"
diff --git a/scripts/ip-up b/scripts/ip-up
index c7d02ab..b09430e 100755
--- a/scripts/ip-up
+++ b/scripts/ip-up
@@ -9,6 +9,8 @@
# Ludwig Nussel 26.02.2004
# Send suggestions and comments to http://www.suse.de/feedback/
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
+
BASENAME=${0##*/}
INTERFACE=$1
DEVICE=$2
diff --git a/scripts/netconfig b/scripts/netconfig
index ac6ddad..74cce29 100755
--- a/scripts/netconfig
+++ b/scripts/netconfig
@@ -28,6 +28,7 @@
# because it was changed since the last run
#
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
# The environment variable ROOT indicates the root of the system to be
# managed by SuSEconfig when that root is not '/'
diff --git a/scripts/netconfig.d/dns-bind b/scripts/netconfig.d/dns-bind
index 72127c6..50e798e 100755
--- a/scripts/netconfig.d/dns-bind
+++ b/scripts/netconfig.d/dns-bind
@@ -21,6 +21,8 @@
#
##
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
+
if test "$UID" != "0" -a "$USER" != root -a -z "$ROOT" ; then
echo "You must be root to start $0." >&2
exit 1
diff --git a/scripts/netconfig.d/dns-dnsmasq b/scripts/netconfig.d/dns-dnsmasq
index 8fa0ebb..2d917a6 100755
--- a/scripts/netconfig.d/dns-dnsmasq
+++ b/scripts/netconfig.d/dns-dnsmasq
@@ -21,6 +21,8 @@
#
##
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
+
if test "$UID" != "0" -a "$USER" != root -a -z "$ROOT" ; then
echo "You must be root to start $0." >&2
exit 1
diff --git a/scripts/netconfig.d/dns-resolver b/scripts/netconfig.d/dns-resolver
index 52391df..be9f0a1 100755
--- a/scripts/netconfig.d/dns-resolver
+++ b/scripts/netconfig.d/dns-resolver
@@ -20,6 +20,8 @@
#
##
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
+
if test "$UID" != "0" -a "$USER" != root -a -z "$ROOT" ; then
echo "You must be root to start $0." >&2
exit 1
diff --git a/scripts/netconfig.d/nis b/scripts/netconfig.d/nis
index e7c379d..a6a66ed 100755
--- a/scripts/netconfig.d/nis
+++ b/scripts/netconfig.d/nis
@@ -20,6 +20,8 @@
#
##
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
+
if test "$UID" != "0" -a "$USER" != root -a -z "$ROOT" ; then
echo "You must be root to start $0." >&2
exit 1
diff --git a/scripts/netconfig.d/ntp-runtime b/scripts/netconfig.d/ntp-runtime
index 162ad1a..86340e8 100755
--- a/scripts/netconfig.d/ntp-runtime
+++ b/scripts/netconfig.d/ntp-runtime
@@ -20,6 +20,8 @@
#
##
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
+
if test "$UID" != "0" -a "$USER" != root -a -z "$ROOT" ; then
echo "You must be root to start $0." >&2
exit 1
diff --git a/scripts/network b/scripts/network
index 906d003..e805492 100755
--- a/scripts/network
+++ b/scripts/network
@@ -41,6 +41,8 @@
# and set up routing
### END INIT INFO
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
+
. /etc/rc.status
rc_reset
diff --git a/scripts/network-remotefs b/scripts/network-remotefs
index 26955f8..1844d4e 100755
--- a/scripts/network-remotefs
+++ b/scripts/network-remotefs
@@ -37,6 +37,8 @@
# Wireless and set up routing or start the NetworkManager
### END INIT INFO
+unset POSIXLY_CORRECT ; set +o posix # we're using non-posix bash features
+
. /etc/rc.status
rc_reset
--
1.7.7