Server IP : 127.0.0.2 / Your IP : 3.14.255.247 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 : |
#! /bin/sh # vim:ts=4:et set -e S_VERSION="10.3.1-1~" PACKAGE="sysstat" DEFAULT="/etc/default/$PACKAGE" ENABLED="false" ### manage_default_file: manages $DEFAULT file with ucf ### manage_default_file() { ENABLED="$1" if [ "$ENABLED" != "true" ] && [ "$ENABLED" != "false" ] ; then echo "Internal error in the sysstat's postinst: \$ENABLED=$ENABLED" 1>&2; exit 1; fi # Generate temporary files def_file=`tempfile -p sstat -s .def` # Fill new temporary default file cat > "$def_file" << EOF # # Default settings for /etc/init.d/sysstat, /etc/cron.d/sysstat # and /etc/cron.daily/sysstat files # # Should sadc collect system activity informations? Valid values # are "true" and "false". Please do not put other values, they # will be overwritten by debconf! ENABLED="$ENABLED" EOF # Finally, run ucf ucf --three-way \ --debconf-ok \ "$def_file" "$DEFAULT" ucfr "$PACKAGE" "$DEFAULT" [ -e "$DEFAULT" ] && chmod 644 "$DEFAULT" rm -f "$def_file" } ### Main ### . /usr/share/debconf/confmodule if [ "$1" = "configure" ] ; then if dpkg --compare-versions "$2" lt-nl "$S_VERSION"; then RET="" db_get sysstat/remove_files || true if [ "$RET" = "true" ]; then echo "Removing old statistics from /var/log/sysstat." 1>&2 find /var/log/sysstat -maxdepth 2 \( -name 'sa[0-9][0-9]' -o -name 'sa[0-9][0-9].gz' \ -o -name 'sa[0-9][0-9].bz2' \) -exec rm -f {} \; fi fi # show the question next time db_reset sysstat/remove_files || true db_get sysstat/enable || true ENABLED="$RET" manage_default_file "$ENABLED" # must be called *after* manage_default_file, which uses ucf --debconf-ok db_stop || true if ! update-alternatives --display sar 2>/dev/null | grep -q '^/usr/bin/sar\.sysstat'; then update-alternatives --install /usr/bin/sar sar /usr/bin/sar.sysstat 0 \ --slave /usr/share/man/man1/sar.1.gz sar.1.gz \ /usr/share/man/man1/sar.sysstat.1.gz fi # execute sa1 in a subshell not to clobber the postinst script with potentially # unsafe values from "$DEFAULT" if [ "$ENABLED" = "true" ] && [ -x /usr/lib/sysstat/sa1 ] ; then ( set +e ; /usr/lib/sysstat/sa1 1 1 )& fi fi # Automatically added by dh_installinit if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then if [ -x "/etc/init.d/sysstat" ]; then update-rc.d sysstat defaults >/dev/null || exit $? fi fi # End automatically added section exit 0