Willkommen im Zyxel Community Forum!
http://www.zyxelforum.de/

manuell angepasste smb.conf wird nach Neustart überschrieben
http://www.zyxelforum.de/viewtopic.php?f=129&t=3335
Seite 1 von 1

Autor:  Mijzelf [ Montag 16. April 2012, 15:26 ]
Betreff des Beitrags:  Re: manuell angepasste smb.conf wird nach Neustart überschri

Zitat:
When i check the /etc/init.d/rcS my new line with the touch-command has been deleted (i think the whole file has been replaced).
That's right. The whole rootfs is a ramdrive, which is extracted on boot from flash. So while it's possible to edit (almost) everything, your changes will be lost on reboot.

Zitat:
Where can i insert / call a script which replaces the smb.conf and restarts samba?
You've got two possibilities. An FFP-Stick, or the package API.

Using the package API you can add your script to /usr/local/zy-pkgs/etc/init.d/ZYPKG_DEPS. Using the FFP-Stick you can add your script to /ffp/start/.
In both cases your script has to be valid and executable. The script must be non-blocking. For FFP it also has to have a .sh extension.

FFP runs chrooted, so the conf file is not where you would expect it, but in /ffp/etc/original/samba/. After editing it you'll have to restart samba using execute_outside_chroot, which you already found.

When you use the package API. you'll have to reinsert your script when you install/update a package, as ZYPKG_DEPS will be regenerated. Unless you create a full-blown package.

Autor:  Punkt3 [ Montag 16. April 2012, 17:27 ]
Betreff des Beitrags:  Re: manuell angepasste smb.conf wird nach Neustart überschri  Beitrag ist gelöst

Thanks, thanks, thanks!!! :D

That works for me!
I created a script in /usr/local/zy-pkgs/etc/init.d/ and inserted this into ZYPKG_DEPS.

With this script i just copy the smb.conf from another directory to /etc/samba and restart the smbd via /etc/init.d/samba.sh

Thats it! :zustimmen:


Thank you very much for the help!


Michael

Autor:  Darkwing [ Dienstag 17. April 2012, 07:34 ]
Betreff des Beitrags:  Re: manuell angepasste smb.conf wird nach Neustart überschri

Come on...share ur stuff with us...
It will/could help others...
So post it here, or we open up a "nice to have section" in this forum...

Grtx

Seite 1 von 1 Alle Zeiten sind UTC + 1 Stunde [ Sommerzeit ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/