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.
25 * Initial (startup) notify list.
27 notify_list *inl = NULL;
31 * Get list of hosts from stable storage, build list of hosts to
32 * contact. These hosts are added to the global RPC notify list
33 * which is processed as soon as statd enters svc_run.
42 if (!(nld = opendir(SM_BAK_DIR))) {
47 while ((de = readdir(nld))) {
48 if (de->d_name[0] == '.')
51 /* The following can happen for loopback NFS mounts
53 if (matchhostname(de->d_name, MY_NAME)
54 || matchhostname(de->d_name, "localhost")) {
56 fname=xmalloc(strlen(SM_BAK_DIR)+sizeof(de->d_name)+2);
57 dprintf(N_DEBUG, "We're on our own notify list?!?");
58 sprintf(fname, "%s/%s", SM_BAK_DIR, de->d_name);
60 note(N_ERROR, "unlink(%s): %s",
61 fname, strerror(errno));
66 call = nlist_new(MY_NAME, de->d_name, -1);
67 NL_TYPE(call) = NOTIFY_REBOOT;
68 nlist_insert(¬ify, call);
71 if (closedir(nld) == -1) {