]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- merge from TOTALNEW branch:
authorJan Rękorajski <baggins@pld-linux.org>
Tue, 17 Jul 2001 18:21:29 +0000 (18:21 +0000)
committerJan Rękorajski <baggins@pld-linux.org>
Tue, 17 Jul 2001 18:21:29 +0000 (18:21 +0000)
- set MTU
- don't use tput if we are not on a proper terminal

svn-id: @931

rc.d/init.d/functions
sysconfig/network-scripts/ifup

index 315f7a2396896868d53c3df571404b9ee2e1986b..e0764b4a7c9d7d676ba06d8e4e1cb40426ffccea 100644 (file)
@@ -1,7 +1,7 @@
 # functions    This file contains functions to be used by most or all
 #              shell scripts in the /etc/init.d directory.
 #
-# $Id: functions,v 1.64 2001/05/15 16:03:38 baggins Exp $
+# $Id: functions,v 1.65 2001/07/17 18:21:28 baggins Exp $
 #
 # Author:      Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
 # Hacked by:    Greg Galloway and Marc Ewing
@@ -44,7 +44,26 @@ termput()
                        ;;
                  esac
        else
-               tput "$@"
+               # check if we are on proper terminal
+               tput longname > /dev/null 2>&1 /dev/null || return
+
+               case "$1" in
+                 hpa)
+                       tput "$@"
+                       ;;
+                 cuu*)
+                       tput "$@"
+                       ;;
+                 el)
+                       tput "$@"
+                       ;;
+                 setaf)
+                       is_yes "$COLOR_INIT" && tput "$@"
+                       ;;
+                 op)
+                       tput setaf 9
+                       ;;
+                esac
        fi
 }
 
index 09fd318891af17a602cb350940b4e1e0619c072f..daff4e32fafcc6a64a71d3a273a8f49188e5dc47 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#      $Id: ifup,v 1.64 2001/07/05 22:21:42 marcus Exp $
+#      $Id: ifup,v 1.65 2001/07/17 18:21:29 baggins Exp $
 #
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
@@ -97,6 +97,10 @@ fi
 
 ip link set ${DEVICE} multicast ${MULTICAST} arp ${ARP} down
 
+if [ -n "$MTU" ]; then
+    ip link set ${DEVICE} mtu ${MTU}
+fi
+
 if is_yes "${IPV6_NETWORKING}" && is_yes "${IPV6_DISABLE_AUTOCONF}"; then
        run_cmd "Disabling IPv6 autoconfiguration" sysctl -w net.ipv6.conf.${DEVICE}=0
 fi
This page took 1.002736 seconds and 4 git commands to generate.