load_interfaces() now gets called if FQDN is set
-p now works with -s
case MODE_VALIDATE :
cmnd = "validate";
break;
+ case MODE_KILL :
+ cmnd = "kill";
+ break;
case MODE_LIST :
cmnd = "list";
printmatches = 1;
}
/* must have a command to run unless got -s */
- if (Argc == 1 && !(sudo_mode & MODE_SHELL))
+ if (cmnd == NULL && Argc == 1 && !(sudo_mode & MODE_SHELL))
usage(1);
/*
#else
}
- /*
- * load a list of ip addresses and netmasks into
- * the interfaces array.
- */
- load_interfaces();
-
/*
* We don't want to return the fully quallified name unless FQDN is set
*/
if ((p = strchr(host, '.')))
*p = '\0';
#endif /* FQDN */
+
+ /*
+ * load a list of ip addresses and netmasks into
+ * the interfaces array.
+ */
+ load_interfaces();
}
switch (Argv[1][1]) {
case 'p':
- if (Argc < 4)
+ if (Argc + (ret & MODE_SHELL) < 4)
usage(1);
prompt = Argv[2];