Browse Source

stick /var/run/stab in a #define in netcfg.h just like all the other stuff we use

r17317
master
Joshua Kwan 18 years ago
parent
commit
43a19e3acd
  1. 4
      netcfg-common.c
  2. 1
      netcfg.h

4
netcfg-common.c

@ -192,10 +192,10 @@ short find_in_stab(const char* iface)
char buf[128];
size_t len = strlen(iface);
if (access("/var/run/stab", F_OK) == -1)
if (access(STAB, F_OK) == -1)
return 0;
if (!(dn = popen("grep -v '^Socket' /var/run/stab | cut -f5", "r")))
if (!(dn = popen("grep -v '^Socket' " STAB " | cut -f5", "r")))
return 0;
while (fgets (buf, 128, dn) != NULL)

1
netcfg.h

@ -12,6 +12,7 @@
#define DEVNAMES "/etc/network/devnames"
#define DEVHOTPLUG "/etc/network/devhotplug"
#define STAB "/var/run/stab"
#define _GNU_SOURCE

Loading…
Cancel
Save