Re: [nslu2-general] Unslung 5.5 symbolic link to smb.conf not working rc.samba?
- In message <PO1z+tB$e67CFwKv@...>, Robert Hammond
>In message <dclstm+ma4v@...>, paulthego <p.spam@...>Many apologies, I knew it would line wrap so have re-posted the two
>>I have followed the instructions here http://www.nslu2-
>>linux.org/wiki/HowTo/AttachAFAT32FormattedDrive to attach a FAT32
>>drive and have nearly got it working the problem I am having is that
>>my rc.samba which contains
>>rm -f /etc/samba/smb.conf
>>ln -s /opt/etc/smb.conf /etc/samba/smb.conf
>>does not seem to delete the smb.conf out of /etc/samba and I end up
>>with 2 files named smb.conf in /etc/samba. I cannot get the symbolic
>>link to work from within the file. If I delete /etc/samba/smb.* and
>>then manually type the ln command from above and then issue
>>a /etc/rc.d/rc.samba everything works.
>>Has anyone else seen this or can tell me where I've gone wrong?
>There is no actual need to use the symbolic link method, my personal
>opinion is that deleting any system file is bad practice and not needed.
>You can directly change the smb.conf file using an rc.samba diversion
>script without deleting any files. The relevant part of my script is
>below (it may line wrap in this mail message), stored in
># Diversion script: to modify the Samba smb.conf file
># First, make a backup copy of /etc/samba/smb.conf
>if [ ! -e /etc/samba/smb.conf.orig ]; then
>cp -p /etc/samba/smb.conf /etc/samba/smb.conf.orig
># Script section for FAT32 Support
># If there is no [FAT32HDD] section then append to end of file
>if ( !(grep "\[FAT32HDD\]" /etc/samba/smb.conf -q) ) then
>cat << EOF >> /etc/samba/smb.conf
># End of FAT32 script section
># Continue to start samba
if [ ! -e /etc/samba/smb.conf.orig ]; then
cp -p /etc/samba/smb.conf /etc/samba/smb.conf.orig
if ( !(grep "\[FAT32HDD\]" /etc/samba/smb.conf -q) ) then
cat << EOF >> /etc/samba/smb.conf
- Thanks for the help / tips.
I have discovered a bigger problem and that is my rootfs is not on my
Hard disk but still in flash so I am going to start again from scratch.
Hopefully I will get to the same point.