Dre4m Shell
Server IP : 127.0.0.2  /  Your IP : 18.222.177.138
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 :  /var/lib/dpkg/info/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /var/lib/dpkg/info/sysv-rc.postinst
#!/bin/sh

set -e

now=`date +%Y%m%dT%H%M`
logdir=/var/lib/insserv
logfile="$logdir/run-$now.log"

# Make sure insserv is in path
PATH=/usr/lib/insserv:/sbin:$PATH

# Based on code from dash postinst
check_divert() {
    package=insserv
    div=$(dpkg-divert --list $2)
    distrib=${4:-$2.distrib}
    case "$1" in
    false)
        if [ -n "$div" ] && [ -z "${div%%*by $package}" ]; then
	    mv $distrib $2
	    dpkg-divert --package $package --remove $2
	fi
	;;
    status) # Return true if the divert is in effect
        if [ -n "$div" ] && [ -z "${div%%*by $package}" ]; then
            :
	else
	    false
	fi
    esac
}

convert_rc_s_to_k() {
  runlevel=$1
  for link in $(cd $target/etc/rc$runlevel.d; ls S* || true); do
      set `echo $link|sed "s%S\(..\)\(.*\)%\1 \2%"`
      seq=$1
      service=$2
      mv $target/etc/rc$runlevel.d/$link $target/etc/rc$runlevel.d/K$seq$service
  done
}

legacy_bootordering() {
    for f in /etc/rc0.d/S* ; do
	if [ -f $f ] ; then
	    return 0
	fi
    done

    return 1
}

activate_insserv() {
    echo "info: Reordering boot system, log to $logfile" 1>&2
    (
	echo "info: Converting rc0.d/S* and rc6.d/S* to K*." 1>&2
	convert_rc_s_to_k 0
	convert_rc_s_to_k 6
	echo "info: running insserv" 1>&2
	insserv -v
    ) > $logfile 2>&1 || return 1

    return 0
}

case "$1" in
    configure)
	if check_divert status /usr/sbin/update-rc.d \
	    /usr/sbin/update-rc.d-insserv ; then
		check_divert false /usr/sbin/update-rc.d \
			/usr/sbin/update-rc.d-insserv
	fi

	if dpkg --compare-versions "$2" lt "2.88dsf-41ubuntu13"; then
	    rm -f /etc/init.d/.legacy-bootordering
	fi

	if legacy_bootordering ; then
	    # Still using legacy ordering, try to convert
	    if activate_insserv ; then
		echo "success: Enabled dependency based boot system." 1>&2
	    else
		echo "error: Something failed while migrating." 1>&2
		cat 1>&2 <<EOF

error: Unable to migrate to dependency based boot sequencing.

See http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot for
more information about dependency based boot sequencing. To
reattempt the migration process run 'dpkg --configure sysv-rc'.

EOF
		exit 1;
	    fi
	fi
	;;
    *)
	;;
esac



Anon7 - 2022
AnonSec Team