--- freem/src/fmadm.c	2025/04/02 03:02:42	1.24
+++ freem/src/fmadm.c	2025/04/02 04:50:49	1.25
@@ -1,5 +1,5 @@
 /*
- *   $Id: fmadm.c,v 1.24 2025/04/02 03:02:42 snw Exp $
+ *   $Id: fmadm.c,v 1.25 2025/04/02 04:50:49 snw Exp $
  *    FreeM Administration Tool
  *
  *  
@@ -24,6 +24,9 @@
  *   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.
  *
  *   $Log: fmadm.c,v $
+ *   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
  *   Stop requiring users to pass -e to fmadm when -u or -g are passed
  *
@@ -1520,7 +1523,7 @@ void fm_configure (void)
     mkdir (buf, 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) {
         fprintf (stderr, "\nfmadm:  could not open source directory %s\n", src_dir);
@@ -1531,13 +1534,19 @@ void fm_configure (void)
         char infile[4096];
         char outfile[4096];
         
-        if ((strcmp (ent->d_name, ".") != 0) && (strcmp (ent->d_name, "..") != 0)) {
-            
-            fprintf (stderr, "\t%s\n", ent->d_name);
+        if ((strcmp (ent->d_name, ".") != 0) && (strcmp (ent->d_name, "..") != 0)) {           
             
             snprintf (infile, 4095, "%s/%s", src_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 (cp (outfile, infile) != 0) {
                 fprintf (stderr, "fmadm:  failure copying %s to %s\n", infile, outfile);