3 # Copyright (C) 2009 Google Inc.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 # This is an example script that configures you /etc/network/interfaces after
21 # installation. By default its sets up the system to use dhcp. To use it just
22 # put it in your CUSTOMIZE_DIR and make it executable.
24 if [ -z "$TARGET" -o ! -d "$TARGET" ]; then
25 echo "Missing target directory"
29 if [ ! -d "$TARGET/etc/network" ]; then
30 echo "Missing target network directory"
34 if [ -z "$NIC_COUNT" ]; then
35 echo "Missing NIC COUNT"
39 if [ "$NIC_COUNT" -gt 0 ]; then
41 cat > $TARGET/etc/network/interfaces <<EOF
42 # This file describes the network interfaces available on your system
43 # and how to activate them. For more information, see interfaces(5).
46 iface lo inet loopback