#!/bin/sh -efu
### This file is covered by the GNU General Public License
### version 2 or later.
###
### Copyright (C) 2018  ALT Linux Team
### Author: Leonid Krivoshein <klark@altlinux.org>

if [ -z "${__included_rescue_launcher_nfs-}" ]; then
__included_rescue_launcher_nfs=1

# Remote NFS-server
autorun_probe_nfs_method() {
	local opts="-t nfs4 -o ro,noatime,nosuid,soft,intr,nolock"

	autorun_debug "Probing NFS..."
	autorun_spawn test -n "${AUTORUN_SERVER-}" || return 1
	autorun_spawn test -n "${AUTORUN_DIRECTORY-}" || return 1
	autorun_mount $opts "$AUTORUN_SERVER:$AUTORUN_DIRECTORY" || return 1

	return 0
}

fi #__included_rescue_launcher_nfs
