#define nil ((void*)0)
+#include <minix/paths.h>
+
/* Paths to files. */
-#define PATH_DHCPCONF "/etc/dhcp.conf"
-#define PATH_DHCPPID "/usr/run/dhcpd.pid"
-#define PATH_DHCPCACHE "/usr/adm/dhcp.cache"
-#define PATH_DHCPPOOL "/usr/adm/dhcp.pool"
+#define PATH_DHCPCONF _PATH_DHCPCONF
+#define PATH_DHCPPID _PATH_DHCPPID
+#define PATH_DHCPCACHE _PATH_DHCPCACHE
+#define PATH_DHCPPOOL _PATH_DHCPPOOL
#define CLID_MAX 32 /* Maximum client ID length. */
char hostt[HMAX+1]; /* login host */
};
-char LASTLOG[] = "/usr/adm/lastlog"; /* last login info */
-char USERLOG[] = "/etc/utmp"; /* who is logged in */
+#include <minix/paths.h>
+
+char LASTLOG[] = _PATH_LASTLOG; /* last login info */
+char USERLOG[] = _PATH_UTMP; /* who is logged in */
char PLAN[] = "/.plan"; /* what plan file is */
char PROJ[] = "/.project"; /* what project file */
#include <net/gen/resolv.h>
#include <net/gen/dhcp.h>
+#include <minix/paths.h>
+
char *prog_name;
-char DHCPCACHE[]="/usr/adm/dhcp.cache";
+char DHCPCACHE[]=_PATH_DHCPCACHE;
void main _ARGS(( int argc, char *argv[] ));
void usage _ARGS(( void ));
#include <stdio.h>
#include <errno.h>
+#include <minix/paths.h>
#define FALSE 0
#define TRUE 1
*/
void Print_Uptime()
{
- char *utmp_file = "/etc/utmp";
+ char *utmp_file = _PATH_UTMP;
unsigned nusers;
struct utmp ut;
FILE *uf;
int argc;
char *argv[];
{
- char *wtmp_file = "/usr/adm/wtmp";
+ char *wtmp_file = _PATH_WTMP;
FILE *f;
long size; /* Number of wtmp records in the file */
int wtmp_count; /* How many to read into wtmp_buffer */
#include <time.h>
#include <sys/utsname.h>
#include <minix/minlib.h>
+#include <minix/paths.h>
-char PATH_UTMP[] = "/etc/utmp"; /* current logins */
-char PATH_WTMP[] = "/usr/adm/wtmp"; /* login/logout history */
-char PATH_LASTLOG[] = "/usr/adm/lastlog"; /* last login history */
-char PATH_MOTD[] = "/etc/motd"; /* message of the day */
+char PATH_UTMP[] = _PATH_UTMP; /* current logins */
+char PATH_WTMP[] = _PATH_WTMP; /* login/logout history */
+char PATH_LASTLOG[] = _PATH_LASTLOG; /* last login history */
+char PATH_MOTD[] = _PATH_MOTD; /* message of the day */
#define TTY_GID 4 /* group ID of ttys */
#include <utmp.h>
#include <errno.h>
-char PATH_UTMP[] = "/etc/utmp"; /* current logins */
+#include <minix/paths.h>
+
+char PATH_UTMP[] = _PATH_UTMP; /* current logins */
_PROTOTYPE(void usage , (void));
_PROTOTYPE(int main , (int argc , char *argv []));
#include <net/gen/udp_io.h>
#include <net/gen/dhcp.h>
+#include <minix/paths.h>
+
#define HTTL 3600L /* Default time to live for /etc/hosts data. */
#define SHORT_TIMEOUT 2 /* If you expect an answer soon. */
#define MEDIUM_TIMEOUT 4 /* Soon, but not that soon. */
#define DO_TCP (__minix_vmd || !__minix)
/* Host data, file to store our process id in, our cache, DHCP's cache. */
-static char HOSTS[]= "/etc/hosts";
+static char HOSTS[]= _PATH_HOSTS;
static char PIDFILE[]= "/usr/run/nonamed.pid";
static char NNCACHE[]= "/usr/adm/nonamed.cache";
-static char DHCPCACHE[]="/usr/adm/dhcp.cache";
+static char DHCPCACHE[]= _PATH_DHCPCACHE;
/* Magic string to head the cache file. */
static char MAGIC[4]= "NND\2";
#include <utmp.h>
#include <time.h>
#include <string.h>
+#include <minix/paths.h>
-char PATH_UTMP[] = "/etc/utmp";
+char PATH_UTMP[] = _PATH_UTMP;
char day[] = "SunMonTueWedThuFriSat";
char month[] = "JanFebMarAprMayJunJulAugSepOctNovDec";
#include <utmp.h>
#include <time.h>
#include <stdio.h>
+#include <minix/paths.h>
static char *Version = "@(#) WRITE 1.6 (10/24/92)";
if (verbose) fprintf(stderr, "Trying to write to %s\n",
userptr->pw_gecos);
- if ((utmpfd = open("/etc/utmp", O_RDONLY)) < 0) {
+ if ((utmpfd = open(_PATH_UTMP, O_RDONLY)) < 0) {
fprintf(stderr, "Cannot open utmp file\n");
return(NULL);
}