/* vi: set sw=4 ts=4: */
/*
* ifupdown for busybox
- * Copyright (c) 2002 Glenn McGrath <bug1@iinet.net.au>
+ * Copyright (c) 2002 Glenn McGrath
* Copyright (c) 2003-2004 Erik Andersen <andersen@codepoet.org>
*
* Based on ifupdown v 0.6.4 by Anthony Towns
static int dhcp_up(struct interface_defn_t *ifd, execfn *exec)
{
#if ENABLE_FEATURE_IFUPDOWN_EXTERNAL_DHCP
+ int i;
#if ENABLE_FEATURE_IFUPDOWN_IP
/* ip doesn't up iface when it configures it (unlike ifconfig) */
if (!execute("ip link set %iface% up", ifd, exec))
return 0;
#endif
- int i;
for (i = 0; i < ARRAY_SIZE(ext_dhcp_clients); i++) {
if (exists_execable(ext_dhcp_clients[i].name))
return execute(ext_dhcp_clients[i].startcmd, ifd, exec);
static int bootp_up(struct interface_defn_t *ifd, execfn *exec)
{
return execute("bootpc[[ --bootfile %bootfile%]] --dev %iface%"
- "[[ --server %server%]][[ --hwaddr %hwaddr%]] "
- "--returniffail --serverbcast", ifd, exec);
+ "[[ --server %server%]][[ --hwaddr %hwaddr%]]"
+ " --returniffail --serverbcast", ifd, exec);
}
static int ppp_up(struct interface_defn_t *ifd, execfn *exec)
cmds = iface_up;
}
- getopt32(argc, argv, OPTION_STR, &interfaces);
+ getopt32(argv, OPTION_STR, &interfaces);
if (argc - optind > 0) {
if (DO_ALL) bb_show_usage();
} else {
iface_list = iface_list->link;
}
if (VERBOSE) {
- puts("");
+ bb_putchar('\n');
}
if (!okay && !FORCE) {