move bash script out of the makefile. Also do not set CONFIG_SYSFS_DEPRECATED if...
[linux-2.6.git] / modify_rh_config.sh
diff --git a/modify_rh_config.sh b/modify_rh_config.sh
new file mode 100755 (executable)
index 0000000..e26c77a
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+pushd SOURCES > /dev/null
+
+sed -i -e "s,CONFIG_IPV6=m,CONFIG_IPV6=y,g" config-generic
+sed -i -e "/\# CONFIG_KVM is not set/d" config-x86-generic-rhel
+sed -i -e "s,CONFIG_MODULE_SIG=y,CONFIG_MODULE_SIG=n,g" config-generic-rhel
+
+# Do not enable CONFIG_SYSFS_DEPRECATED options for Scientific Linux
+if ! grep -q Scientific /etc/redhat-release; then
+       sed -i -e "s,# CONFIG_SYSFS_DEPRECATED is not set,CONFIG_SYSFS_DEPRECATED=y,g" config-generic
+       sed -i -e "s,# CONFIG_SYSFS_DEPRECATED_V2 is not set,CONFIG_SYSFS_DEPRECATED_V2=y,g" config-generic
+fi
+
+popd