logo       

Re: Re: WINS server: msg#00360

misc.nslu2.linux

Subject: Re: Re: WINS server


In message <d17anf+ubdo-B11MqFFcr05BDgjK7y7TUQ@xxxxxxxxxxxxxxxx>,
quasi_quixotic
<rob.hammond-XZoyATsUNX5Wk0Htik3J/w@xxxxxxxxxxxxxxxx> writes
>I need to do a little more work regarding a boot up scrip, reading
>through the Wiki suggests two possible routes, either to follow the
>FAT32 Wiki or the CUPS Wiki, I think that there is now a need for
>an agreed common method to modify the Samba Config file, the CUPS
>Wiki looks to be more up to date so is probably best (perhaps the
>FAT32 Wiki needs updateing also).
>
I now have a working script, it's based on the excellent CUPS script
and is pasted below. When I get time I will post something up on Wiki
site. Save the script in the /unslung directory as file name rc.samba.


#! /bin/sh
# Diversion script: to modify the Samba smb.conf file
#
# Reason: to add or change Samba2 functionality
#
#
# Make sure we have 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
fi
#
# Add New Script Sections below here
#
#
#
# Script section to enable the Samba built in Wins Server
#
# Check for 'wins server' (external Wins server)
# and 'wins support' (internal Samba Wins server) lines.
# If not present then insert line into [global] section
# to enable the built in Wins Server.
if ( !(grep "wins s" /etc/samba/smb.conf -q) ) then
sed -i -e 's/\[global\]$/\[global\]\nwins support \= yes/'
/etc/samba/smb.conf
fi
#
# End of Wins Server script section
#
# Add other script sections here
#
# Continue to start samba
#
return 1
# EOF - include this line
#


Note that my own file also contains a script section to initialise my
FAT32 disk partition. The extra script section for this is:-

#
#
# 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
[FAT32HDD]
valid users=@"administrators",@"everyone"
comment=FAT32 Partition
path=/share/hddvfat/
public=yes
read only=no
write list=@"administrators",@"everyone"

EOF
fi
#
# End of FAT32 script section
#


--
Robert Hammond
PGP:0x154144DA


[ Moderator Note: All static information is slowly moving to the Wiki at
http://www.nslu2-linux.org ]


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise