From 263abdfdcfada7384654024b5050e1a2ecb9228b Mon Sep 17 00:00:00 2001 From: Martin Seener Date: Sun, 17 Aug 2014 17:09:00 +0200 Subject: [PATCH] AutoNFS v1.4.1: added support for Systemd init-system (OpenSUSE) fixes #6 Signed-off-by: Martin Seener --- CHANGELOG.md | 3 +++ README.md | 2 +- {Debian => SysVinit}/etc/init.d/autonfs | 0 Systemd/etc/systemd/system/autonfs.service | 10 ++++++++++ {Ubuntu => Upstart}/etc/init/autonfs.conf | 0 usr/local/bin/autonfs.sh | 2 +- 6 files changed, 15 insertions(+), 2 deletions(-) rename {Debian => SysVinit}/etc/init.d/autonfs (100%) create mode 100644 Systemd/etc/systemd/system/autonfs.service rename {Ubuntu => Upstart}/etc/init/autonfs.conf (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c19f96..41fd653 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ AutoNFS is a client-side autofs-free NFS Share Automount-Script, initially designed for Debian Squeeze or derivates. The Code can be found at [https://github.com/martinseener/autonfs](https://github.com/martinseener/autonfs) +## v1.4.1 +- Renamed OS folders to Init-System names. So we support SysVinit (Debian), Upstart (Ubuntu) and the new Systemd (OpenSUSE) and their respective derivates ([fixed #6](https://github.com/martinseener/autonfs/issues/6)) + ## v1.4 - Removed Roadmap from README - we have Github for this - made autonfs SysVinit script conform with 2-space indentation ([fixes #5](https://github.com/martinseener/autonfs/issues/5)) diff --git a/README.md b/README.md index 6a7e80c..73f0d94 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The initial Github version of AutoNFS v1.2.1 - as is - running quite well and st The locations of the files are given through the folders in this Repository, so for example the autonfs.sh should reside in /usr/local/bin folder in your NFS-Client but starting v1.3 it can differ if new location is correctly set in /etc/default/autonfs config file. 1. Place a copy of the autonfs.sh (actual script) in the desired folder -2. Place a copy of the autonfs init/upstart file in the desired folder (see your folder distribution) +2. Place a copy of the autonfs init/upstart/systemd file in the desired folder (see your init-systems folder) - Make both executable with `chmod +x /` 3. Place the /etc/default/autonfs file in the same path on your machine - Modify the file by setting the correct `NFSSERVER` and `MOUNTS` vars and optionally `NFSVERS`, `MOUNTOPT` and `INTERVAL` and set the correct location of the autonfs.sh script, if you have placed it differently from the default in step 1! diff --git a/Debian/etc/init.d/autonfs b/SysVinit/etc/init.d/autonfs similarity index 100% rename from Debian/etc/init.d/autonfs rename to SysVinit/etc/init.d/autonfs diff --git a/Systemd/etc/systemd/system/autonfs.service b/Systemd/etc/systemd/system/autonfs.service new file mode 100644 index 0000000..aa2b63c --- /dev/null +++ b/Systemd/etc/systemd/system/autonfs.service @@ -0,0 +1,10 @@ +[Unit] +Description=AutoNFS is a client-side autofs-free NFS Share Automount-Script +After=network.target + +[Service] +ExecStart=/usr/local/bin/autonfs +Restart=on-abort + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/Ubuntu/etc/init/autonfs.conf b/Upstart/etc/init/autonfs.conf similarity index 100% rename from Ubuntu/etc/init/autonfs.conf rename to Upstart/etc/init/autonfs.conf diff --git a/usr/local/bin/autonfs.sh b/usr/local/bin/autonfs.sh index 6fde814..dc9523b 100644 --- a/usr/local/bin/autonfs.sh +++ b/usr/local/bin/autonfs.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# AutoNFS v1.4 +# AutoNFS v1.4.1 # (c) 2012-2014 by Martin Seener (martin@seener.de) # Licensed under the GPLv2