|
|
| version 1.24, 2025/04/02 03:02:42 | version 1.25, 2025/04/02 04:50:49 |
|---|---|
| Line 24 | Line 24 |
| * along with FreeM. If not, see <https://www.gnu.org/licenses/>. | * along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
| * | * |
| * $Log$ | * $Log$ |
| * Revision 1.25 2025/04/02 04:50:49 snw | |
| * Allow vendor routines to be upgraded | |
| * | |
| * Revision 1.24 2025/04/02 03:02:42 snw | * Revision 1.24 2025/04/02 03:02:42 snw |
| * Stop requiring users to pass -e to fmadm when -u or -g are passed | * Stop requiring users to pass -e to fmadm when -u or -g are passed |
| * | * |
| Line 1520 void fm_configure (void) | Line 1523 void fm_configure (void) |
| mkdir (buf, 0775); | mkdir (buf, 0775); |
| set_permissions (buf, username, groupname, 0775); | set_permissions (buf, username, groupname, 0775); |
| fprintf (stderr, "fmadm: copying routines from '%s' to '%s'...\n", src_dir, dest_dir); | fprintf (stderr, "fmadm: copying vendor routines from '%s' to '%s'...\n", src_dir, dest_dir); |
| if ((dir = opendir (src_dir)) == NULL) { | if ((dir = opendir (src_dir)) == NULL) { |
| fprintf (stderr, "\nfmadm: could not open source directory %s\n", src_dir); | fprintf (stderr, "\nfmadm: could not open source directory %s\n", src_dir); |
| Line 1531 void fm_configure (void) | Line 1534 void fm_configure (void) |
| char infile[4096]; | char infile[4096]; |
| char outfile[4096]; | char outfile[4096]; |
| if ((strcmp (ent->d_name, ".") != 0) && (strcmp (ent->d_name, "..") != 0)) { | if ((strcmp (ent->d_name, ".") != 0) && (strcmp (ent->d_name, "..") != 0)) { |
| fprintf (stderr, "\t%s\n", ent->d_name); | |
| snprintf (infile, 4095, "%s/%s", src_dir, ent->d_name); | snprintf (infile, 4095, "%s/%s", src_dir, ent->d_name); |
| snprintf (outfile, 4095, "%s/%s", dest_dir, ent->d_name); | snprintf (outfile, 4095, "%s/%s", dest_dir, ent->d_name); |
| if (stat (outfile, &etcstat) == 0) { | |
| unlink (outfile); | |
| fprintf (stderr, "\tupgrade -> %s\n", ent->d_name); | |
| } | |
| else { | |
| fprintf (stderr, "\tnew -> %s\n", ent->d_name); | |
| } | |
| #if !defined(__OS2__) | #if !defined(__OS2__) |
| if (cp (outfile, infile) != 0) { | if (cp (outfile, infile) != 0) { |
| fprintf (stderr, "fmadm: failure copying %s to %s\n", infile, outfile); | fprintf (stderr, "fmadm: failure copying %s to %s\n", infile, outfile); |