CGI-ds.conf is a copy of the contents of the SysConf partition. I think it is recreated on each boot from the flash contents.
From: "Fernando Carolo" <carolo@...
Date: Friday, Sep 1, 2006 11:17 pm
Subject: [nslu2-linux] Re: How to prevent samba starting in unSlung6.x?
--- In email@example.com, 'CN' <t4chacko@...> wrote:
> It turns out this is only half of the solution :) The WatchDog
> smdb and nmdb !! So that has to be changed too.
> Cordially, Chacko
You are right, I missed this one.
Looking at the /usr/sbin/Watchdog script, it checks for the line that
says 'msn_enable=yes' in /etc/CGI_ds.conf before checking if samba is
running. Therefore, if we can change this line we can prevent the
watchdog from restarting smbd and nmbd.
I don't know if CGI_ds.conf is one of the config files recreated at
every boot by rc.bootbin, so you will have to test this. Edit
/etc/CGI_ds.conf, cahnge msn_enable to 'no', reboot your slug
and see if the change is still there. If we can make this change
permanent, the Watchdog will no longer restart samba.
Another idea, if you really want to disable samba, is to edit the
Watchdog script and comment the lines that restart smbd and nmbd.
As a third option, we can edit CGI_ds.conf everytime the slug boots
but this requires sed, that is included only as an Optware package.
You could create a script under /opt/etc/init.d, let's say
'S10disablesamba', that edits CGI_ds.conf (note that the sed command
line must fit in a single line, regardless of the formatting you see
in this message):
/opt/bin/sed --in-place=.bak -e 's/^msn_enable *= *yes/msn_enable=no/'
A script like this will edit CGI_ds.conf everty time your slug boots,
leaving the old content in a backup file with a .bak suffix. Since you
will need sed for this, 'ipkg install sed' if you don't already have
Ok, so I gave you three options. The first one is easier but I'm not
sure it will work, given the way the Linksys binaries called at boot
time change some config files, but you should try it first anyway. If
it doesn't work, then use another one. The last option, with an extra
script, has the advantage of not messing with the original contents
of the firmware, in case you want to go back to the original bahaviour