Revision e0f1ce56 example/instance-image.d/interfaces
b/example/instance-image.d/interfaces | ||
---|---|---|
38 | 38 |
fi |
39 | 39 |
|
40 | 40 |
if [ -z "${TARGET}" -o ! -d "${TARGET}" ] ; then |
41 |
echo "Missing target directory"
|
|
41 |
log_error "Missing target directory"
|
|
42 | 42 |
exit 1 |
43 | 43 |
fi |
44 | 44 |
|
45 | 45 |
if [ -z "${NIC_COUNT}" ] ; then |
46 |
echo "Missing NIC_COUNT"
|
|
46 |
log_error "Missing NIC_COUNT"
|
|
47 | 47 |
exit 1 |
48 | 48 |
fi |
49 | 49 |
|
... | ... | |
59 | 59 |
|
60 | 60 |
debian_setup() { |
61 | 61 |
if [ ! -d "${TARGET}/etc/network" ] ; then |
62 |
echo "Missing target network directory"
|
|
62 |
log_error "Missing target network directory"
|
|
63 | 63 |
exit 1 |
64 | 64 |
fi |
65 | 65 |
cat > ${TARGET}/etc/network/interfaces << EOF |
... | ... | |
81 | 81 |
|
82 | 82 |
redhat_setup() { |
83 | 83 |
if [ ! -d "${TARGET}/etc/sysconfig/network-scripts" ] ; then |
84 |
echo "Missing target network directory"
|
|
84 |
log_error "Missing target network directory"
|
|
85 | 85 |
exit 1 |
86 | 86 |
fi |
87 | 87 |
cat > ${TARGET}/etc/sysconfig/network-scripts/ifcfg-eth0 << EOF |
... | ... | |
105 | 105 |
|
106 | 106 |
gentoo_setup() { |
107 | 107 |
if [ ! -f "${TARGET}/etc/conf.d/net" ] ; then |
108 |
echo "Missing target network file"
|
|
108 |
log_error "Missing target network file"
|
|
109 | 109 |
exit 1 |
110 | 110 |
fi |
111 | 111 |
cat > ${TARGET}/etc/conf.d/net << EOF |
... | ... | |
122 | 122 |
|
123 | 123 |
suse_setup() { |
124 | 124 |
if [ ! -d ${TARGET}/etc/sysconfig/network ] ; then |
125 |
echo "Missing target network directory"
|
|
125 |
log_error "Missing target network directory"
|
|
126 | 126 |
exit 1 |
127 | 127 |
fi |
128 | 128 |
cat > ${TARGET}/etc/sysconfig/network/ifcfg-eth0 << EOF |
... | ... | |
151 | 151 |
suse_setup |
152 | 152 |
;; |
153 | 153 |
*) |
154 |
echo "Unsupported OS_TYPE"
|
|
154 |
log_error "Unsupported OS_TYPE"
|
|
155 | 155 |
exit 1 |
156 | 156 |
;; |
157 | 157 |
esac |
Also available in: Unified diff