HEX
Server: Apache/2.2.34 (Unix) mod_fastcgi/mod_fastcgi-SNAP-0910052141
System: Linux Kou-Etsu-Dou 4.4.59+ #25556 SMP PREEMPT Thu Mar 4 18:03:46 CST 2021 x86_64
User: hosam (1026)
PHP: 7.2.29
Disabled: NONE
Upload Files
File: //usr/libexec/volume/mount/TCMVolumeMountHook.sh
#!/bin/sh

case $1 in
	--sdk-mod-ver)
		echo "1.0"
	;;
	--name)
		echo "TCM (linux lio, target core mod) volume mount hook"
	;;
	--pkg-ver)
		echo "1.0"
	;;
	--vendor)
		echo "Synology Inc."
	;;
	--pre)
	;;
	--post)
		/usr/syno/bin/synoiscsihook --volume_mount ${MOUNTPOINT}
		# do nothing when mounting at booting-up stage
		if /usr/syno/bin/synobootseq --is-booting-up > /dev/null 2>&1 ; then
			if [ -z "`status iscsitrg-adapter | grep running`" ]; then
				exit
			fi
		fi
		# do nothing when mounting at shutdown stage
		if /usr/syno/bin/synobootseq --is-shutdown > /dev/null 2>&1 ; then
			exit
		fi

		/usr/syno/bin/synoiscsiep --startall iscsi
	;;
	*)
		echo "Usage: $0 --sdk-mod-ver|--name|--pkg-ver|--vendor|--pre|--post"
	;;
esac