# Fetch resource values LoadResources subnet workgroup smblog external \ printer encrypt loglevel external # Allow external Samba connections? if [ "$external" == "yes" ]; then nosa=";" hostname=`hostname` subnet=`grep $hostname /etc/hosts |awk -F. '{print $1"."$2"."$3}'` xinterface="$subnet.0/255.255.255.0" else nosa="" xinterface="" fi # Create configuration sed <$smb_conf.tmpl >$smb_conf \ -e "s@%SUBNET%@$subnet@g" \ -e "s@%WORKGROUP%@$workgroup@g" \ -e "s@%SMBLOG%@$smblog@g" \ -e "s@%PRINTER%@$printer@g" \ -e "s@%ENCRYPT%@$encrypt@g" \ -e "s@%LOGLEVEL%@$loglevel@g" \ -e "s@%NOSA%@$nosa@g" \ -e "s@%XINTERFACE%@ $xinterface@g" # Start VMware /etc/rc.d/init.d/vmware start >>$logfile