|
|
1.1 ! root 1: /* ! 2: * Set up site/machine specific info in files /etc/uucpname and /etc/domain ! 3: */ ! 4: ! 5: /* ! 6: * Includes ! 7: */ ! 8: ! 9: #include <stdio.h> ! 10: #include <string.h> ! 11: #include "build0.h" ! 12: ! 13: /* ! 14: * definitions ! 15: */ ! 16: ! 17: #define UUCPNAME "/etc/uucpname" ! 18: #define DOMAIN "/etc/domain" ! 19: ! 20: ! 21: main() ! 22: { ! 23: char cp[25]; ! 24: char cmd[80]; ! 25: ! 26: system("/bin/clear"); ! 27: ! 28: printf( ! 29: "In order to use COHERENT's electronic mail facility and UUCP subsystem,\n" ! 30: "you must choose a \"site name\" for your computer system. In general, a site\n" ! 31: "name consists of lower case letters or digits and should be at most seven\n" ! 32: "characters in length. The name you choose should be unique if you intend\n" ! 33: "to access any other computer systems. Some of the more well known site\n" ! 34: "names include \"mwc\", \"uunet\", \"clout\", \"decwrl\", \"hp\", \"kgbvax\", " ! 35: "\"prep\",\n\"seismo\", and \"ucbvax\".\n\n" ! 36: ); ! 37: for (;;) { ! 38: printf("\nPlease enter the site name for this system: "); ! 39: gets(cp); ! 40: if (strlen(cp) < 9) ! 41: break; ! 42: } ! 43: sprintf(cmd, "/bin/echo \"%s\" >/etc/uucpname", cp); ! 44: system(cmd); ! 45: ! 46: printf( ! 47: "\nThe COHERENT mail subsystem supports \"domain addressing\" in addition to\n" ! 48: "traditional \"bang paths\". Until your system becomes part of a registered\n" ! 49: "domain, you may use the UUCP pseudo-domain. Domain names consist of groups\n" ! 50: "of letters and digits separated by periods (dots). Some of the more well\n" ! 51: "known domains include \"com\", \"edu\", \"gov\", \"org\", \"net\", as well as domains\n" ! 52: "covering a geographical area, such as the Chicago area \"chi.il.us\" domain.\n" ! 53: "If you are not registered in a domain, or if you are uncertain about this\n" ! 54: "question, simply press the <Enter> key to default to the UUCP pseudo-domain.\n\n" ! 55: ); ! 56: for (;;) { ! 57: printf("\nPlease enter the domain name for this system: "); ! 58: gets(cp); ! 59: if(strlen(cp) == 0){ ! 60: strcpy(cp,"UUCP"); ! 61: break; ! 62: } ! 63: if(cp[0] == '.'){ ! 64: strcpy(cp, cp + 1); ! 65: break; ! 66: } ! 67: break; ! 68: } ! 69: sprintf(cmd, "/bin/echo \"%s\" >/etc/domain", cp); ! 70: system(cmd); ! 71: } ! 72:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.