Dre4m Shell
Server IP : 127.0.0.2  /  Your IP : 3.134.81.178
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 :  /usr/share/insserv/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/insserv/seq-changes
#! /bin/bash
# Script from Frans Pop

set -e

if [ -z "$1" ]; then
	echo "Usage: insserv-seq-changes /var/lib/insserv/<old bootscripts tarball>"
	exit 1
fi

oldtar="$(tar tzf $1)"
for i in S $(seq 0 6); do
	echo "Runlevel $i"
	new="$(cd /etc/rc$i.d; ls -1 [KS]* | sort | nl)"
	old="$(echo "$oldtar" | grep "^rc$i.d/[KS]" | cut -d/ -f2 | sort | nl)"
	case $i in
	    S|0|6)
		old="$(echo "$old" | sed -r "s/[KS][0-9]+//")"
		new="$(echo "$new" | sed -r "s/[KS][0-9]+//")"
		;;
	    *)
		old="$(echo "$old" | sed -r "s/([KS])[0-9]+/\1_/")"
		new="$(echo "$new" | sed -r "s/([KS])[0-9]+/\1_/")"
		;;
	esac
	echo "$new" | while read num cmd; do
		oldnum=$(echo "$old" | grep "[[:space:]]$cmd$" | awk '{print $1}')
		if [ "$oldnum" ]; then
			diff=$(($num - $oldnum))
		else
			oldnum="---"
			diff=""
		fi
		if [ ${#cmd} -ge 16 ]; then
			echo -e "$cmd\t$num\t$oldnum\t$diff"
		elif [ ${#cmd} -ge 8 ]; then
			echo -e "$cmd\t\t$num\t$oldnum\t$diff"
		else
			echo -e "$cmd\t\t\t$num\t$oldnum\t$diff"
		fi
	done
	echo "$old"  | while read num cmd; do
		if ! echo "$new" | grep -q "[[:space:]]$cmd$"; then
			if [ ${#cmd} -ge 16 ]; then
				echo -e "$cmd\t---\t$oldnum"
			elif [ ${#cmd} -ge 8 ]; then
				echo -e "$cmd\t\t---\t$oldnum"
			else
				echo -e "$cmd\t\t\t---\t$oldnum"
			fi
		fi
	done
	echo
done

Anon7 - 2022
AnonSec Team