2 * Copyright (C) 1995, 1997-1999 Jeffrey A. Uphoff
3 * Modified by Olaf Kirch, Oct. 1996.
4 * Modified by H.J. Lu, 1998.
10 * NSM notify list handling.
27 * Initial (startup) notify list.
29 notify_list *inl = NULL;
33 * Get list of hosts from stable storage, build list of hosts to
34 * contact. These hosts are added to the global RPC notify list
35 * which is processed as soon as statd enters svc_run.
44 if (!(nld = opendir(SM_BAK_DIR))) {
49 while ((de = readdir(nld))) {
50 if (de->d_name[0] == '.')
53 /* The following can happen for loopback NFS mounts
55 if (matchhostname(de->d_name, MY_NAME)
56 || matchhostname(de->d_name, "localhost")) {
58 fname=xmalloc(strlen(SM_BAK_DIR)+sizeof(de->d_name)+2);
59 dprintf(N_DEBUG, "We're on our own notify list?!?");
60 sprintf(fname, "%s/%s", SM_BAK_DIR, de->d_name);
62 note(N_ERROR, "unlink(%s): %s",
63 fname, strerror(errno));
68 call = nlist_new(MY_NAME, de->d_name, -1);
69 NL_TYPE(call) = NOTIFY_REBOOT;
70 nlist_insert(¬ify, call);
73 if (closedir(nld) == -1) {