Dre4m Shell
Server IP : 127.0.0.2  /  Your IP : 18.191.9.67
Web Server : Apache/2.4.18 (Ubuntu)
System :
User : www-data ( )
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/open-iscsi/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /lib/open-iscsi/startup-checks.sh
#!/bin/sh
#
# This script does the required startup checks before the iSCSI
# daemon should be started. It also generates a name if that
# hadn't been done before.
#

PATH=/sbin:/bin

NAMEFILE=/etc/iscsi/initiatorname.iscsi
CONFIGFILE=/etc/iscsi/iscsid.conf

if [ ! -e "$CONFIGFILE" ]; then
	echo >&2
	echo "Error: configuration file $CONFIGFILE is missing!" >&2
	echo "The iSCSI driver has not been correctly installed and cannot start." >&2
	echo >&2
	exit 1
fi

if [ ! -f $NAMEFILE ]; then
	echo >&2
	echo "Error: InitiatorName file $NAMEFILE is missing!" >&2
	echo "The iSCSI driver has not been correctly installed and cannot start." >&2
	echo >&2
	exit 1
fi

# see if we need to generate a unique iSCSI InitiatorName
if grep -q "^GenerateName=yes" $NAMEFILE ; then
	if [ ! -x /sbin/iscsi-iname ] ; then
		echo "Error: /sbin/iscsi-iname does not exist, driver was not successfully installed" >&2
		exit 1
	fi
	# Generate a unique InitiatorName and save it
	INAME=`/sbin/iscsi-iname -p iqn.1993-08.org.debian:01`
	if [ "$INAME" != "" ] ; then
		echo "## DO NOT EDIT OR REMOVE THIS FILE!" > $NAMEFILE
		echo "## If you remove this file, the iSCSI daemon will not start." >> $NAMEFILE
		echo "## If you change the InitiatorName, existing access control lists" >> $NAMEFILE
		echo "## may reject this initiator.  The InitiatorName must be unique">> $NAMEFILE
		echo "## for each iSCSI initiator.  Do NOT duplicate iSCSI InitiatorNames." >> $NAMEFILE
		printf "InitiatorName=$INAME\n"  >> $NAMEFILE
		chmod 600 $NAMEFILE
	else
		echo "Error: failed to generate an iSCSI InitiatorName, driver cannot start." >&2
		echo >&2
		exit 1
	fi
fi

# make sure there is a valid InitiatorName for the driver
if ! grep -q "^InitiatorName=[^ \t\n]" $NAMEFILE ; then
	echo >&2
	echo "Error: $NAMEFILE does not contain a valid InitiatorName." >&2
	echo "The iSCSI driver has not been correctly installed and cannot start." >&2
	echo >&2
	exit 1
fi

Anon7 - 2022
AnonSec Team