403Webshell
Server IP : 172.67.191.97  /  Your IP : 104.23.197.208
Web Server : Apache/2.4.63 (Ubuntu)
System : Linux adminpruebas-Virtual-Machine 6.14.0-37-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 22:10:32 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 8.4.5
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/lib/dpkg/info/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/lib/dpkg/info/systemd.postinst
#!/bin/sh

set -e

_systemctl() {
    if [ -z "$DPKG_ROOT" ] && [ -d /run/systemd/system ]; then
        systemctl "$@"
    fi
}

_update_catalog() {
    journalctl ${DPKG_ROOT:+--root="$DPKG_ROOT"} --update-catalog || true
}

_update_binfmt() {
    if [ "$(_systemctl show -P LoadState systemd-binfmt.service)" != "masked" ]; then
        _systemctl restart systemd-binfmt.service || true
    fi
}

_update_sysctl() {
    if [ "$(_systemctl show -P LoadState systemd-sysctl.service)" != "masked" ]; then
        _systemctl restart systemd-sysctl.service || true
    fi
}

_restart_managers() {
    _systemctl daemon-reexec || true
    # Re-exec user instances so that running user managers are updated too.
    # SIGRTMIN+25 -> reexec. Note that this is asynchronous, but we can't use
    # D-Bus as dbus-user-session is not guaranteed to be available.
    _systemctl kill --kill-whom='main' --signal='SIGRTMIN+25' 'user@*.service' || true
    # do not restart logind
    # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=919509
    _systemctl try-restart systemd-networkd.service || true
    _systemctl try-restart systemd-journald.service || true
}

# Update Message Catalogs database and binfmt registrations in response to dpkg triggers
if [ "$1" = "triggered" ]; then
    shift
    for trigger in $@; do
        case $trigger in
            /usr/lib/systemd/catalog)
                _update_catalog
                ;;
            /usr/lib/binfmt.d)
                _update_binfmt
                ;;
            /usr/lib/sysctl.d)
                _update_sysctl
                ;;
            libc-upgrade)
                _restart_managers
                ;;
        esac
    done
    exit 0
fi

# Enable getty, remote-fs.target and systemd-pstore by default on new installs
if [ -z "$2" ]; then
    systemctl ${DPKG_ROOT:+--root="$DPKG_ROOT"} enable [email protected] || true
    systemctl ${DPKG_ROOT:+--root="$DPKG_ROOT"} enable remote-fs.target || true
    systemctl ${DPKG_ROOT:+--root="$DPKG_ROOT"} enable systemd-pstore.service || true
fi

# Create /etc/machine-id
systemd-machine-id-setup ${DPKG_ROOT:+--root="$DPKG_ROOT"}

# Enable persistent journal, in auto-mode, by default on new installs
if [ -z "$2" ]; then
    mkdir -p "$DPKG_ROOT/var/log/journal"
fi

# Initial update of the Message Catalogs database
_update_catalog

# Move the old locale file into /etc. Symlinks will be created by tmpfiles.d later
if [ -f "$DPKG_ROOT/etc/default/locale" ] && [ ! -L "$DPKG_ROOT/etc/default/locale" ] && [ ! -f "$DPKG_ROOT/etc/locale.conf" ]; then
    mv "$DPKG_ROOT/etc/default/locale" "$DPKG_ROOT/etc/locale.conf"
fi

# Process all tmpfiles that we ship, including any overrides in
# runtime-dir/sysadmin-dir/other packages (e.g. rsyslog)
#
# Ignore if this fails, because e.g. %b will fail on WSL
systemd-tmpfiles --create || :

# We used to ship tmp.mount in /usr/share as an example, and some users link it in /etc/,
# remove the link as a workaround until Trixie ships. This method would also have created
# a link in local-fs.target.wants, so remove that too.
if [ -n "$2" ] && [ -L "$DPKG_ROOT/etc/systemd/system/tmp.mount" ] && [ "$(readlink "$DPKG_ROOT/etc/systemd/system/tmp.mount")" = "/usr/share/systemd/tmp.mount" ]; then
    rm -f "$DPKG_ROOT/etc/systemd/system/tmp.mount"
    rm -f "$DPKG_ROOT/etc/systemd/system/local-fs.target.wants/tmp.mount"
fi

# The user may have used 'systemctl enable /usr/share/systemd/tmp.mount', which
# would have created a symlink in the local-fs.target.wants directory (as the
# pre-Trixie tmp.mount included an [install] section for that purpose). If it
# exists, remove it.
if [ -n "$2" ] && [ -L "$DPKG_ROOT/etc/systemd/system/local-fs.target.wants/tmp.mount" ] && [ "$(readlink "$DPKG_ROOT/etc/systemd/system/local-fs.target.wants/tmp.mount")" = "/usr/share/systemd/tmp.mount" ]; then
    rm -f "$DPKG_ROOT/etc/systemd/system/local-fs.target.wants/tmp.mount"
fi

# Unless it's already running, ensure /tmp/ does not get overwritten by
# the tmpfs from tmp.mount in case a unit is later activated that implicitly
# depends on it (for example with PrivateTmp=yes) by runtime masking it
if ! _systemctl is-active --quiet tmp.mount; then
    _systemctl mask --runtime tmp.mount
fi

# Automatically added by dh_installsysusers/13.24.1ubuntu2
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
   systemd-sysusers ${DPKG_ROOT:+--root="$DPKG_ROOT"} basic.conf systemd-journal.conf systemd-network.conf
fi
# End automatically added section
# Automatically added by dh_installtmpfiles/13.24.1ubuntu2
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
	if [ -x "$(command -v systemd-tmpfiles)" ]; then
		systemd-tmpfiles ${DPKG_ROOT:+--root="$DPKG_ROOT"} --create 20-systemd-shell-extra.conf 20-systemd-ssh-generator.conf 20-systemd-stub.conf credstore.conf debian.conf home.conf journal-nocow.conf legacy.conf provision.conf systemd-network.conf systemd-nologin.conf systemd-pstore.conf systemd-tmp.conf systemd.conf tmp.conf var.conf x11.conf || true
	fi
fi
# End automatically added section
# Automatically added by dh_installdeb/13.24.1ubuntu2
dpkg-maintscript-helper rm_conffile /etc/systemd/resolved.conf 251.3-2\~ -- "$@"
# End automatically added section


# skip daemon-reexec and try-restarts during shutdown to avoid hitting LP: #1803391
if [ -n "$2" ] && [ "$(systemctl is-system-running)" != "stopping" ]; then
    _restart_managers
fi

Youez - 2016 - github.com/yon3zu
LinuXploit