KUNTUL | JINGKONTOT
JINGKONTOT


Server : Apache/2.4.41 (Ubuntu)
System : Linux journalup 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : 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_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /var/lib/dpkg/info/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

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

set -e

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

_update_catalog() {
    journalctl --update-catalog || true
}

# Update Message Catalogs database and reload in response to dpkg triggers
if [ "$1" = "triggered" ]; then
    shift
    for trigger in $@; do
        case $trigger in
            /usr/lib/systemd/catalog)
                _update_catalog
                ;;
            /etc/init.d)
                _systemctl daemon-reload || true
                ;;
        esac
    done
    exit 0
fi

# Enable getty and remote-fs.target by default on new installs
if [ -z "$2" ]; then
    systemctl enable [email protected] || true
    systemctl enable remote-fs.target || true
fi

# Enable resolved by default on new installs installs and upgrades
if dpkg --compare-versions "$2" lt "234-1ubuntu2~"; then
    systemctl enable systemd-resolved.service || true
fi

# Drop stock /etc/rc.local on upgrades
if dpkg --compare-versions "$2" lt "234-2ubuntu11~"; then
        if [ -f /etc/rc.local ]; then
                if [ "10fd9f051accb6fd1f753f2d48371890" = "$(md5sum /etc/rc.local | cut -d\  -f1)" ]; then
                        echo Removing empty /etc/rc.local
                        rm -f /etc/rc.local || true
                fi
        fi
fi

# Use stub resolve.conf by default on new installs
if [ -z "$2" ]; then
    mkdir -p /run/systemd/resolve
    if [ -e /etc/resolv.conf ]; then
            cp /etc/resolv.conf /run/systemd/resolve/stub-resolv.conf
    fi
    # If /etc/resolv.conf is a bind-mount, moving or replacing
    # /etc/resolv.conf may fail
    ln -snf ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf || true
fi

# Enable ondemand by default on new installs
if [ -e /lib/systemd/system/ondemand.service ] && [ -z "$2" ]; then
    systemctl enable ondemand.service || true
fi

# Enable systemd-pstore by default on new installs and upgrades, see #952767
if dpkg --compare-versions "$2" lt "245.4-4~"; then
    systemctl enable systemd-pstore.service || true
fi

# Do a one-time migration of the local time setting
if [ -z "$2" ]; then
    if [ -f /etc/default/rcS ]; then
        . /etc/default/rcS
    fi
    if [ "$UTC" = "no" ] && [ ! -e /etc/adjtime ]; then
        printf "0.0 0 0.0\n0\nLOCAL\n" > /etc/adjtime
    fi
fi

# Do a one-time migration of the TMPTIME setting
if [ -z "$2" ]; then
    if [ -f /etc/default/rcS ]; then
        . /etc/default/rcS
    fi
    if [ ! -e /etc/tmpfiles.d/tmp.conf ]; then
        case "$TMPTIME" in
            -*|infinite|infinity)
                cat > /etc/tmpfiles.d/tmp.conf <<EOF
# Avoid clearing /tmp by shipping an empty /etc/tmpfiles.d/tmp.conf file
# which overrides /usr/lib/tmpfiles.d/tmp.conf.
# This file was automatically created because of local modifications in
# /etc/default/rcS where TMPTIME was set to infinite.
EOF
                ;;
        esac
    fi
fi

# Do a one-time migration of the RAMTMP setting
if [ -z "$2" ]; then
    if [ -f /etc/default/rcS ]; then
        . /etc/default/rcS
    fi
    if [ -f /etc/default/tmpfs ]; then
        . /etc/default/tmpfs
    fi
    if [ "$RAMTMP" = "yes" ]; then
        # systemctl enable will work even when systemd is not the active PID 1.
        if [ ! -e /etc/systemd/system/tmp.mount ]; then
            cp /usr/share/systemd/tmp.mount /etc/systemd/system/tmp.mount
            systemctl enable tmp.mount || true
        fi
    fi
fi

# Create /etc/machine-id
systemd-machine-id-setup

# Setup system users and groups
addgroup --quiet --system systemd-journal

adduser --quiet --system --group --no-create-home --home /run/systemd \
    --gecos "systemd Network Management" systemd-network
adduser --quiet --system --group --no-create-home --home /run/systemd \
    --gecos "systemd Resolver" systemd-resolve

# Enable persistent journal, in auto-mode, by default on new installs installs and upgrades
if dpkg --compare-versions "$2" lt "235-3ubuntu3~"; then
    mkdir -p /var/log/journal
    # create tmpfiles only when running systemd, otherwise %b substitution fails
    if [ -d /run/systemd/system ]; then
        systemd-tmpfiles --create --prefix /var/log/journal
    fi
fi

# Initial update of the Message Catalogs database
_update_catalog

# Disable networkd when upgrading from broken versions 8..10. Turns out
# enabling networkd unconditionally has long boot time side-effects
if dpkg --compare-versions "$2" gt "234-2ubuntu8~" &&
   dpkg --compare-versions "$2" lt "234-2ubuntu11~"; then
    systemctl disable systemd-networkd-wait-online.service || true
fi

# skip daemon-reexec and try-restarts during shutdown to avoid hitting LP: #1803391
if [ -n "$2" ] && [ "$(systemctl is-system-running)" != "stopping" ]; then
    _systemctl daemon-reexec || true
    # don't restart logind; this can be done again once this gets implemented:
    # https://github.com/systemd/systemd/issues/1163
    _systemctl try-restart systemd-networkd.service || true
    _systemctl try-restart systemd-resolved.service || true
    _systemctl try-restart systemd-journald.service || true
fi

if dpkg --compare-versions "$2" lt-nl "235-3~"; then
    # systemd-bus-proxyd got dropped before stretch, and never created any file
    deluser --system systemd-bus-proxy || true
fi

if dpkg --compare-versions "$2" lt-nl "236-1~"; then
    # Clean up old /var/lib/systemd/clock on upgrade.
    # The clock file used by systemd-timesyncd is now stored in
    # StateDirectory=systemd/timesync.
    rm -f /var/lib/systemd/clock
fi

if dpkg --compare-versions "$2" lt-nl "239-12~"; then
    # clean up bogus "nobody" group from #912525; ensure that it's a system group
    if getent group nobody >/dev/null; then
        delgroup --system nobody || true
    fi
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 || :

if dpkg --compare-versions "$2" lt-nl "245.4-4~"; then
    # systemd-pstore.service is now enabled via sysinit.target
    rm -f /etc/systemd/system/systemd-remount-fs.service.wants/systemd-pstore.service
    rmdir --ignore-fail-on-non-empty /etc/systemd/system/systemd-remount-fs.service.wants 2> /dev/null || true
fi

# Automatically added by dh_installdeb/12.10ubuntu1
dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.freedesktop.hostname1.conf 233-3\~ -- "$@"
dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.freedesktop.locale1.conf 233-3\~ -- "$@"
dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.freedesktop.login1.conf 233-3\~ -- "$@"
dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.freedesktop.machine1.conf 228-5\~ -- "$@"
dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.freedesktop.network1.conf 233-3\~ -- "$@"
dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.freedesktop.resolve1.conf 233-3\~ -- "$@"
dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.freedesktop.systemd1.conf 233-3\~ -- "$@"
dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.freedesktop.timedate1.conf 233-3\~ -- "$@"
dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.freedesktop.systemd-shim.conf 239-15\~ systemd-shim -- "$@"
dpkg-maintscript-helper rm_conffile /etc/dhcp/dhclient-exit-hooks.d/timesyncd 245.4-2\~ -- "$@"
dpkg-maintscript-helper rm_conffile /etc/systemd/timesyncd.conf 245.4-2\~ -- "$@"
# End automatically added section


KUNTUL | JINGKONTOT |