HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, 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
Upload Files
File: //proc/self/root/var/lib/dpkg/info/quota.postinst
#! /bin/sh
# postinst script for quota
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
#        * <postinst> `configure' <most-recently-configured-version>
#        * <old-postinst> `abort-upgrade' <new version>
#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
#          <new-version>
#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
#          <failed-install-package> <version> `removing'
#          <conflicting-package> <version>
# for details, see /usr/doc/packaging-manual/
#
# quoting from the policy:
#     Any necessary prompting should almost always be confined to the
#     post-installation script, and should be protected with a conditional
#     so that unnecessary prompting doesn't happen if a package's
#     installation fails and the `postinst' is called with `abort-upgrade',
#     `abort-remove' or `abort-deconfigure'.

# create list of all fs with quota
scan_fstab()
{
        tmplist=`egrep -e "^[ ]*[^#].*(usrquota|usrjquota|uquota|uqnoenforce|grpquota|grpjquota|gquota|gqnoenforce)" /etc/fstab | \
              sed -e 's/\(^[[:space:]]*[^[:space:]]*[[:space:]]*[^[:space:]]*[[:space:]]*[^[:space:]]*\).*/\1/g' \
                  -e 's/^[[:space:]]*[^[:space:]]*[[:space:]]*//g'`
        list=${tmplist:=empty}
}

if [ "$1" = "configure" ]; then
  . /usr/share/debconf/confmodule
  #
  # generate the config files if they don't exist
  #

  if [ ! -f /etc/warnquota.conf ]; then
    db_get quota/mailfrom
    mailfrom="$RET"
    db_get quota/supportemail
    supportemail="$RET"
    db_get quota/supportphone
    supportphone="$RET"
    db_get quota/message
    message="$RET"
    db_get quota/signature
    signature="$RET"
    db_get quota/subject
    subject="$RET"
    db_get quota/cc
    cc="$RET"
    db_get quota/charset
    charset="$RET"
    db_get quota/cc_before
    cc_before="$RET"

    temp=`mktemp /etc/warnquota.conf.XXXXXX`
    cat <<EOF >"$temp"
# Debian configuration 
# generated from debconf on `date`
#
# Command used to send email
MAIL_CMD 	= "/usr/sbin/sendmail -t"
# From email used in generated emails
FROM 		= "$mailfrom"
# Subject line
SUBJECT 	= $subject
# Send a copy to this address
CC_TO 		= "$cc"
# Support email for assistance (included in generated mail)
SUPPORT 	= "$supportemail"
# Support phone for assistance (included in generated mail)
PHONE 		= "$supportphone"
EOF

    if [ -n "$message" ]; then
	cat <<EOF >>"$temp"
# The message to send
MESSAGE		= "$message"
EOF
    fi

    if [ -n "$signature" ]; then
	cat <<EOF >>"$temp"
# The signature of the mail
SIGNATURE	= "$signature"
EOF
    fi
    
    if [ -n "$charset" ]; then
	cat <<EOF >>"$temp"
# character set the email is to be send in 
CHARSET		= "$charset"
EOF
    fi

    if [ -n "$cc_before" ]; then
	cat <<EOF >>"$temp"
# CC admin this time before the end of grace period
CC_BEFORE	= "$cc_before"
EOF
    fi

    mv $temp /etc/warnquota.conf
  fi

  if [ ! -f /etc/default/quota ]; then
    db_get quota/run_warnquota
    run_warnquota="$RET"
    temp=`mktemp /etc/default/quota.XXXXXX`
    cat <<EOF >"$temp"
# Configuration for quota scripts
# generated from debconf on `date`
#
# Set to "true" if warnquota should be run in cron.daily
run_warnquota="$run_warnquota"
EOF
    mv $temp /etc/default/quota
  fi

  #
  # stop debconf
  #
  db_stop
fi

case "$1" in
    configure)
	# if we have a recenty configured package, do nothing
	if test ! -f /var/run/quota.upgrade; then
		if [ -f /etc/fstab ]; then
			# enable quota if already configured
			scan_fstab
			set -- $list
			if [ $# -ge 2 ]; then
				if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
					invoke-rc.d quota start
				else
					/etc/init.d/quota start > /dev/null 2>&1 &
				fi
			fi
		fi

		# set quota_is_new file
		touch /var/lib/quota/new
	fi
	# if the old /var/state/quota dir exists, move the files to the new location
	if [ -d /var/state/quota ]; then
		[ ! -f /var/state/quota/off ] || touch /var/lib/quota/off
	        [ ! -f /var/state/quota/new ] || touch /var/lib/quota/new
		rm -rf /var/state/quota
	fi
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)

    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 0
    ;;
esac

#
# remove old links
#
if test -f /var/run/quota.upgrade 
then
	if dpkg --compare-versions "$2" lt 3.00pre01-10
	then
		update-rc.d -f quota remove 2>/dev/null > /dev/null  
	elif dpkg --compare-versions "$2" lt 3.12-3
	then
		update-rc.d -f quotarpc remove 2>/dev/null > /dev/null
	elif dpkg --compare-versions "$2" lt 3.17-4
	then
		rm -f /etc/rcS.d/S*quotarpc
	fi
fi

rm -f /var/run/quota.upgrade

# Automatically added by dh_systemd_enable
# This will only remove masks created by d-s-h on package removal.
deb-systemd-helper unmask quota.service >/dev/null || true

# was-enabled defaults to true, so new installations run enable.
if deb-systemd-helper --quiet was-enabled quota.service; then
	# Enables the unit on first installation, creates new
	# symlinks on upgrades if the unit file has changed.
	deb-systemd-helper enable quota.service >/dev/null || true
else
	# Update the statefile to add new symlinks (if any), which need to be
	# cleaned up on purge. Also remove old symlinks.
	deb-systemd-helper update-state quota.service >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_systemd_enable
# This will only remove masks created by d-s-h on package removal.
deb-systemd-helper unmask quotarpc.service >/dev/null || true

# was-enabled defaults to true, so new installations run enable.
if deb-systemd-helper --quiet was-enabled quotarpc.service; then
	# Enables the unit on first installation, creates new
	# symlinks on upgrades if the unit file has changed.
	deb-systemd-helper enable quotarpc.service >/dev/null || true
else
	# Update the statefile to add new symlinks (if any), which need to be
	# cleaned up on purge. Also remove old symlinks.
	deb-systemd-helper update-state quotarpc.service >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_installinit
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
	if [ -x "/etc/init.d/quota" ]; then
		update-rc.d quota defaults >/dev/null || exit $?
	fi
fi
# End automatically added section
# Automatically added by dh_installinit
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
	if [ -x "/etc/init.d/quotarpc" ]; then
		update-rc.d quotarpc defaults >/dev/null
		invoke-rc.d quotarpc start || exit $?
	fi
fi
# End automatically added section


exit 0