+
+# Work around incompatibities built into Linux console. The 2.6 series added
+# a patch to fixup the SI/SO behavior, which is closer to vt100, but the older
+# kernels do not recognize those controls.
+system=`uname -s 2>/dev/null`
+if test "x$system" = xLinux
+then
+ case x`uname -r` in
+ x1.*)
+cat <<EOF
+/^# This is Linux console for ncurses/,/^$/{
+ s/use=linux3.0,/use=linux-c,/
+}
+EOF
+ ;;
+ x2.[0-4]*)
+cat <<EOF
+/^# This is Linux console for ncurses/,/^$/{
+ s/use=linux3.0,/use=linux2.2,/
+}
+EOF
+ ;;
+ esac
+fi