Skip to content

Commit

Permalink
NFS: fix dependency with automount
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoparker committed Jun 6, 2018
1 parent 05c14ce commit 412eee2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 34 deletions.
8 changes: 7 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@

[v0.56.15](https://github.com/nextcloud/nextcloudpi/commit/7439045) (2018-05-28) ncp-web: added chinese translations
[v0.56.18](https://github.com/nextcloud/nextcloudpi/commit/caaa4cd) (2018-06-06) NFS: fix dependency with automount

[v0.56.17](https://github.com/nextcloud/nextcloudpi/commit/b4038ca) (2018-06-04) ncp-web: sanitize the ref parameter

[v0.56.16](https://github.com/nextcloud/nextcloudpi/commit/6eaa853) (2018-05-29) build: fix cleanup armbian images

[v0.56.15](https://github.com/nextcloud/nextcloudpi/commit/6600972) (2018-05-28) ncp-web: added chinese translations

[v0.56.14](https://github.com/nextcloud/nextcloudpi/commit/c47fb2d) (2018-05-27) re-rename to NCPi

Expand Down
35 changes: 2 additions & 33 deletions etc/ncp-config.d/NFS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,39 +28,8 @@ install()
systemctl disable nfs-kernel-server
systemctl mask nfs-blkmap

cat > /etc/systemd/system/nfs-common.services <<EOF
[Unit]
Description=NFS Common daemons
Wants=remote-fs-pre.target
DefaultDependencies=no
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/etc/init.d/nfs-common start
ExecStop=/etc/init.d/nfs-common stop
[Install]
WantedBy=sysinit.target
EOF

cat > /etc/systemd/system/rpcbind.service <<EOF
[Unit]
Description=RPC bind portmap service
After=systemd-tmpfiles-setup.service
Wants=remote-fs-pre.target
Before=remote-fs-pre.target
DefaultDependencies=no
[Service]
ExecStart=/sbin/rpcbind -f -w
KillMode=process
Restart=on-failure
[Install]
WantedBy=sysinit.target
Alias=portmap
EOF
# delay init because of automount
sed -i 's|^ExecStartPre=.*|ExecStartPre=/bin/bash -c "/bin/sleep 30; /usr/sbin/exportfs -r"|' /lib/systemd/system/nfs-server.service
}

configure()
Expand Down
4 changes: 4 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ done
systemctl enable nc-provisioning
}

# fix NFS dependency with automount
rm -f /etc/systemd/system/rpcbind.service /etc/systemd/system/nfs-common.services
sed -i 's|^ExecStartPre=.*|ExecStartPre=/bin/bash -c "/bin/sleep 30; /usr/sbin/exportfs -r"|' /lib/systemd/system/nfs-server.service

} # end - only live updates

exit 0
Expand Down

0 comments on commit 412eee2

Please sign in to comment.