nas4free embedded: auto mount samba share on boot

nas4free embedded: auto mount samba share on boot

October 26, 2017  |  FreeBSD/NAS4Free, NAS Server  |  No Comments  |  Share

Nas4Free Embedded, is the most fault tolerant version for nas4free, but it has a downside; changes are not persistent. like, for example, I required my other samba shares to be mounted on nas4free embedded on boot  so what I did was; placed the below script in command script GUI page placed “.nsmbrc” on share drive named prime – which had the password so it does not get prompted during boot for password and kept the mount folder inside share also, obviously that folder inside share named “SHARENAME” will not be accessible by the network, but it was the only place persistent, we can also extend the command script to make the folder in /mnt.

 

cp -vr /mnt/prime/mise/.nsmbrc /root/.nsmbrc && sudo mount_smbfs -N -I 10.0.0.2 //username@NETBIOSNAME/SHARENAME /mnt/prime/SHARENAME/

below is what I wrote in .nsmbrc

[NETBIOSNAME]
addr=10.0.0.2

 
 
[NETBIOSNAME:USERNAME]
password=abc123

 

** CAPITAL letters are used to stress case-sensitivity.

reason for writing this was people were having trouble on automount on boot on nas4free embedded because anything changes in fstab on boot will be purged.

format and flags used in .nsmbrc
http://web.mit.edu/freebsd/head/contrib/smbfs/examples/dot.nsmbrc

Installation trouble of deluge on nas4free/FreeBSD 9.2/9.1

Hello everbody,

if you are trying to install deluge on a FreeBSD / Nas4Free 9.2 (FreeBSD 9.2-RELEASE-p3 (kern.osreldate: 902001) (9.2.0.1 – Shigawire (revision 943))).
and goal is to run the most current version of deluge in a console only / WebUI fashion. And you do not want to run the application inside a jail. During the installation you will run into trouble as detailed below. The installation does not seem to go through properly.

This is what the outputs looks like:

pkg_add -r deluge >& install.log:

1
2
pkg_add: command '/usr/bin/printf '1a\n./deluge-1.3.6-py2.7.egg\n.\nw\nq\n' |  /bin/ed /usr/local/lib/python2.7/site-packages/easy-install.pth' failed
Done.

deluged -L error -l firststartlog.log >& firststart.out:
firststartlog.log was empty
firststart.out:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[ERROR   ] 10:55:34 main:237 No module named zope.interface
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/deluge-1.3.6-py2.7.egg/deluge/main.py", line 229, in start_daemon
from deluge.core.daemon import Daemon
File "/usr/local/lib/python2.7/site-packages/deluge-1.3.6-py2.7.egg/deluge/core/daemon.py", line 39, in <module>
from twisted.internet import reactor
File "/usr/local/lib/python2.7/site-packages/twisted/internet/reactor.py", line 37, in <module>
from twisted.internet import default
File "/usr/local/lib/python2.7/site-packages/twisted/internet/default.py", line 56, in <module>
install = _getInstallFunction(platform)
File "/usr/local/lib/python2.7/site-packages/twisted/internet/default.py", line 52, in _getInstallFunction
from twisted.internet.selectreactor import install
File "/usr/local/lib/python2.7/site-packages/twisted/internet/selectreactor.py", line 14, in <module>
from zope.interface import implements
ImportError: No module named zope.interface

Then try  “easy_install zope.interface” 

But now trying to start the deluge-web fails: “deluge-web >& deluge-web.out”

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Traceback (most recent call last):
File "/usr/local/bin/deluge-web", line 9, in <module>
load_entry_point('deluge==1.3.6', 'console_scripts', 'deluge-web')()
File "/usr/local/lib/python2.7/site-packages/deluge-1.3.6-py2.7.egg/deluge/ui/web/web.py", line 138, in start
web.start()
File "/usr/local/lib/python2.7/site-packages/deluge-1.3.6-py2.7.egg/deluge/ui/web/web.py", line 107, in start
import server
File "/usr/local/lib/python2.7/site-packages/deluge-1.3.6-py2.7.egg/deluge/ui/web/server.py", line 59, in <module>
from deluge.ui.web.auth import Auth
File "/usr/local/lib/python2.7/site-packages/deluge-1.3.6-py2.7.egg/deluge/ui/web/auth.py", line 61, in <module>
from deluge.ui.web.json_api import JSONComponent, export
File "/usr/local/lib/python2.7/site-packages/deluge-1.3.6-py2.7.egg/deluge/ui/web/json_api.py", line 60, in <module>
from deluge.ui.web.common import _, compress
File "/usr/local/lib/python2.7/site-packages/deluge-1.3.6-py2.7.egg/deluge/ui/web/common.py", line 38, in <module>
from mako.template import Template as MakoTemplate
ImportError: No module named mako.template

Try “easy_install mako.template” 

this should fix the problems and deluge should start working again.