2010-12-14 21:48:08     What's the preferred way to preserve smb.conf across makes?

Document created by Aaronwu Employee on Aug 25, 2013
Version 1Show Document
  • View in full screen mode

2010-12-14 21:48:08     What's the preferred way to preserve smb.conf across makes?

Robert Cochran (UNITED STATES)

Message: 96717   

 

The romfs rule in the user/samba Makefile blindly overwrites smb.conf with the text "[global]".

 

I modified the Makefile to test for smb.conf before overwriting it (as shown below):

 

--- Makefile    (revision 10001)

+++ Makefile    (working copy)

@@ -9,4 +9,6 @@

romfs:

     $(MAKE) -C $(VER)/source romfs

     mkdir -p $(ROMFSDIR)/etc/config

-    echo "[global]" > $(ROMFSDIR)/etc/config/smb.conf

+    @if [ ! -f $(ROMFSDIR)/etc/config/smb.conf ]; then \

+        echo "[global]" > $(ROMFSDIR)/etc/config/smb.conf; \

+    fi

 

 

Is this bad form?  Perrhaps I should modify my board's Makefile in vendors/AnalogDevices/BFXXX-XXXX to pull smb.conf from common?  However, if I take this approach, then I would still want to modify the samba makefile so it wouldn't potentially overwrite my smb.conf, right?

 

 

 

What's the preferred way to approach this?

 

 

 

Thanks,

 

Bob

QuoteReplyEditDelete

 

 

2010-12-14 22:11:11     Re: What's the preferred way to preserve smb.conf across makes?

Mike Frysinger (UNITED STATES)

Message: 96719   

 

the preferred approach is to have the vendor's Makefile install the final file

 

for ADI boards, you dont really need to modify the Makefile as it'll source a Makefile.local in the same dir.  and in that file, you can declare your own "romfs::" target.

QuoteReplyEditDelete

Attachments

    Outcomes