Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: dhcpcd-hooks/10-mtu

Issue 2428004: Overhaul dhcpcd for chrome os use (Closed) Base URL: ssh://git@chromiumos-git//dhcpcd.git
Patch Set: purge hooks from configure to silence complaint Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « dhcpcd-hooks/01-test ('k') | dhcpcd-hooks/20-resolv.conf » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Configure the MTU for the interface
2
3 mtu_dir="$state_dir/mtu"
4
5 if [ "$reason" = PREINIT -a -e "$mtu_dir/$interface" ]; then
6 rm "$mtu_dir/$interface"
7 elif [ "$reason" != TEST -a -n "$new_interface_mtu" ]; then
8 # The smalled MTU dhcpcd can work with is 576
9 if [ "$new_interface_mtu" -ge 576 ]; then
10 if ifconfig "$interface" mtu "$new_interface_mtu"; then
11 syslog info "$interface: MTU set to $new_interface_mtu"
12 # Save the MTU so we can restore it later
13 if [ ! -e "$mtu_dir/$interface" ]; then
14 mkdir -p "$mtu_dir"
15 echo "$ifmtu" > "$mtu_dir/$interface"
16 fi
17 fi
18 fi
19 elif [ "$reason" != TEST -a -e "$mtu_dir/$interface" ]; then
20 # No MTU in this state, so restore the prior MTU
21 mtu=$(cat "$mtu_dir/$interface")
22 syslog info "$interface: MTU restored to $mtu"
23 ifconfig "$interface" mtu "$mtu"
24 rm "$mtu_dir/$interface"
25 fi
OLDNEW
« no previous file with comments | « dhcpcd-hooks/01-test ('k') | dhcpcd-hooks/20-resolv.conf » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698