]>
Commit | Line | Data |
---|---|---|
e6744e9b SH |
1 | #!/bin/bash |
2 | ||
3 | # lxc: linux Container library | |
4 | ||
5 | # Authors: | |
6 | # Serge Hallyn <serge.hallyn@ubuntu.com> | |
7 | # | |
8 | # This is a test script for the lxc-user-nic program | |
9 | ||
10 | # This library is free software; you can redistribute it and/or | |
11 | # modify it under the terms of the GNU Lesser General Public | |
12 | # License as published by the Free Software Foundation; either | |
13 | # version 2.1 of the License, or (at your option) any later version. | |
14 | ||
15 | # This library is distributed in the hope that it will be useful, | |
16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
18 | # Lesser General Public License for more details. | |
19 | ||
20 | # You should have received a copy of the GNU Lesser General Public | |
21 | # License along with this library; if not, write to the Free Software | |
22 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
23 | ||
24 | set -e | |
25 | ||
26 | s=`mktemp -d /tmp/lxctest-XXXXXX` | |
27 | f="$s/in.conf" | |
28 | ||
29 | cleanup() { | |
30 | lxc-destroy -n lxctestc || true | |
31 | rm -rf $s | |
32 | } | |
33 | ||
34 | trap cleanup EXIT | |
35 | ||
36 | cat > $f << EOF | |
7fa3f2e9 | 37 | lxc.net.0.type = veth |
38 | lxc.net.0.hwaddr = 00:16:3e:xx:xx:xx | |
e6744e9b SH |
39 | EOF |
40 | lxc-create -t busybox -f $f -n lxctestc | |
41 | grep -q "xx:xx" /var/lib/lxc/lxctestc/config && { echo "hwaddr not expanded"; exit 1; } | |
42 | echo "Success" |