From 3a5494131179642e95d827571b2e67f73254e082 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Fri, 16 Aug 2013 23:49:55 +0200 Subject: [PATCH] systemd: add some mount sample service files Signed-off-by: Stephan Raue --- .../systemd/config/system.d/cifs.mount.sample | 50 +++++++++++++++++++ .../systemd/config/system.d/nfs.mount.sample | 50 +++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 packages/sysutils/systemd/config/system.d/cifs.mount.sample create mode 100644 packages/sysutils/systemd/config/system.d/nfs.mount.sample diff --git a/packages/sysutils/systemd/config/system.d/cifs.mount.sample b/packages/sysutils/systemd/config/system.d/cifs.mount.sample new file mode 100644 index 0000000000..2fadb06c63 --- /dev/null +++ b/packages/sysutils/systemd/config/system.d/cifs.mount.sample @@ -0,0 +1,50 @@ +# This is a sample service script to mount CIFS/SAMBA shares. +# Please read carefully the comments in this file. For production usage +# you can remove all comments (lines beginning with "#") from this file. + + +[Unit] +# The description should be used to explain what this servicefile is for +Description=test cifs mount script + +# if we do network mounts like here we *require* 'network-online.service' +# which checks if the network is online +Requires=network-online.service + +# our scripts must start *after* 'network-online.service', on timeout and if +# 'network-online.service' fails we can not mount and this scripts fails too +After=network-online.service + +# usually we mount networks shares because we want they avaible *before* XBMC starts. +# so XBMC has access to this mounts from beginning. Note: this slows down the boot! +Before=xbmc.service + + +[Mount] +# The share we want mount +What=//192.168.0.31/Music + +# Where we want mount this share +Where=/storage/music2 + +# Any options you usually use with the "-o" parameter in the mount command +Options=username=myusername,password=mypassword + +# filesystem type +Type=cifs + + +[Install] +# The target is used by 'servicectl enable ' to link +# this service to a runlevel for starting on boot. usually 'multi-user.target' +# is ok here. +WantedBy=multi-user.target + +# Important: +# this file must be renamed to .mount where , is the FULL path +# where the share will be mounted but slashes "/" MUST BE REPLACED with dashes "-" with .mount +# as extension. +# This means, if we want mount to "/storage/music2" (see above "Where=/storage/music2") +# then this file must be renamed to 'storage-music2.mount' and can be enabled via ssh with the +# command 'servicectl enable storage-music2.mount' + diff --git a/packages/sysutils/systemd/config/system.d/nfs.mount.sample b/packages/sysutils/systemd/config/system.d/nfs.mount.sample new file mode 100644 index 0000000000..26340583a8 --- /dev/null +++ b/packages/sysutils/systemd/config/system.d/nfs.mount.sample @@ -0,0 +1,50 @@ +# This is a sample service script to mount NFS shares. +# Please read carefully the comments in this file. For production usage +# you can remove all comments (lines beginning with "#") from this file. + + +[Unit] +# The description should be used to explain what this servicefile is for +Description=test nfs mount script + +# if we do network mounts like here we *require* 'network-online.service' +# which checks if the network is online +Requires=network-online.service + +# our scripts must start *after* 'network-online.service', on timeout and if +# 'network-online.service' fails we can not mount and this scripts fails too +After=network-online.service + +# usually we mount networks shares because we want they avaible *before* XBMC starts. +# so XBMC has access to this mounts from beginning. Note: this slows down the boot! +Before=xbmc.service + + +[Mount] +# The share we want mount +What=192.168.0.31:/movies + +# Where we want mount this share +Where=/storage/movies2 + +# Any options you usually use with the "-o" parameter in the mount command +Options= + +# filesystem type +Type=nfs + + +[Install] +# The target is used by 'servicectl enable ' to link +# this service to a runlevel for starting on boot. usually 'multi-user.target' +# is ok here. +WantedBy=multi-user.target + +# Important: +# this file must be renamed to .mount where , is the FULL path +# where the share will be mounted but slashes "/" MUST BE REPLACED with dashes "-" with .mount +# as extension. +# This means, if we want mount to "/storage/movies2" (see above "Where=/storage/movies2") +# then this file must be renamed to 'storage-movies2.mount' and can be enabled via ssh with the +# command 'servicectl enable storage-movies2.mount' +