Skip to content

Commit a7ea3ec

Browse files
committed
Bug 8208 - bare metal provisioning
Better the prepare_linmin.sh
1 parent cdaa1ed commit a7ea3ec

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/util/prepare_linmin.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ err_exit() {
88

99
[ ! -f $DHCP_CONF ] && err_exit "Cannot find $DHCP_CONF"
1010

11-
cat $DHCP_CONF | tr '\n' '~' > /tmp/dhcpd.tmp && sed -i 's/\(subnet.*netmask.*{\).*\(~}\)/\1\2/g' /tmp/dhcpd.tmp && cat /tmp/dhcpd.tmp | tr '~' '\n' > $DHCP_CONF && rm /tmp/dhcpd.tmp -f
11+
cat $DHCP_CONF | tr '\n' '~' > /tmp/dhcpd.tmp && sed -i 's/}/}\n/g' /tmp/dhcpd.tmp && sed -i 's/\(subnet.*netmask.*{\).*\(}\)/\1\2/g' /tmp/dhcpd.tmp && cat /tmp/dhcpd.tmp | tr '~' '\n' > $DHCP_CONF && rm /tmp/dhcpd.tmp -f
1212
[ $? -ne 0 ] && err_exit "Configure dhcpd.conf failed"
1313
service dhcpd restart
1414
[ $? -ne 0 ] && err_exit "restart dhcpd failed"

0 commit comments

Comments
 (0)