You are not logged in.

#1 2012-08-02 11:37:51

LittleBrain
Member
Registered: 2009-11-17
Posts: 7

Get Smbnetfs work with systemd

Hi,

I was in the Samba wiki, and I wanted to test smbnetfs, but since I'm testing systemd right now, I notice that smbnetfs doesn't provide any .service file.
Have you got an idea ?

Thanks,

Offline

#2 2012-08-23 01:23:23

boast
Member
Registered: 2010-09-28
Posts: 219

Re: Get Smbnetfs work with systemd

I put stuff that has no .service in rc.conf

Haven't found another way yet

Last edited by boast (2012-08-24 15:50:16)


Asus M4A785TD-V ;; Phenom II X4 @ 3.9GHz ;; Ripjaws 12GB DDR3-1600 ;; 128GB Samsung 830 ;; MSI GTX460 v2 w/ blob ;; Arch Linux + KDE 4.x

Offline

#3 2012-08-31 14:29:45

mindglowba7fb830d2cbbed73
Member
Registered: 2011-04-10
Posts: 26

Re: Get Smbnetfs work with systemd

boast wrote:

I put stuff that has no .service in rc.conf

Haven't found another way yet

I have installed a pure systemd install according to the systemd archwiki page. This means that rc.conf have no function anymore right and it also means that I can't use smbnetfs anymore since I can't load the daemon/service.

Offline

#4 2012-08-31 16:27:45

Stebalien
Member
Registered: 2010-04-27
Posts: 1,239
Website

Re: Get Smbnetfs work with systemd

I haven't tested it but something like this should work. - Tested and fixed. (make sure to set user_allow_other in /etc/fuse.conf).

[Unit]
Description=Mount Samba Shares
After=network.target

[Service]
Environment=HOME=/etc/smbnetfs SMBNETFS_MOUNT_POINT=/mnt/smbnet
EnvironmentFile=/etc/conf.d/smbnetfs
User=nobody
ExecStart=/usr/bin/smbnetfs -f -o allow_other $SMBNETFS_MOUNT_POINT
ExecStop=/bin/fusermount -u $SMBNETFS_MOUNT_POINT

[Install]
WantedBy=multi-user.target

Last edited by Stebalien (2012-08-31 16:51:16)


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C

Offline

#5 2012-10-14 08:32:17

rEnr3n
Member
Registered: 2012-07-25
Posts: 39

Re: Get Smbnetfs work with systemd

@Stebalien I did `systemctl enable smbnetfs.service` and is properly loaded but I still don't see any mounts. It used to work before switching to systemd.

Offline

Board footer

Powered by FluxBB