| Server IP : 127.0.1.1 / Your IP : 216.73.216.152 Web Server : Apache/2.4.52 (Ubuntu) System : Linux bahcrestlinepropertiesllc 5.15.0-113-generic #123-Ubuntu SMP Mon Jun 10 08:16:17 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, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /proc/2792863/root/lib/update-notifier/ |
Upload File : |
#!/bin/sh -e
#
# helper for update-motd
NO_ESM_MESSAGES=""
# poor mans force
if [ "$1" = "--force" ]; then
NEED_UPDATE_CHECK=yes
else
NEED_UPDATE_CHECK=no
fi
# check time when we did the last update check
stamp="/var/lib/update-notifier/updates-available"
# get list dir
StateDir="/var/lib/apt/"
ListDir="lists/"
eval "$(apt-config shell StateDir Dir::State)"
eval "$(apt-config shell ListDir Dir::State::Lists)"
# get dpkg status file
DpkgStatus="/var/lib/dpkg/status"
eval "$(apt-config shell DpkgStatus Dir::State::status)"
# get sources.list file
EtcDir="etc/apt/"
SourceList="sources.list"
eval "$(apt-config shell EtcDir Dir::Etc)"
eval "$(apt-config shell SourceList Dir::Etc::sourcelist)"
# let the actual update be asynchronous to avoid stalling apt-get
cleanup() { rm -f "$tmpfile"; }
# check if we have a list file or sources.list that needs checking
if [ -e "$stamp" ]; then
if [ "$(find "/$StateDir/$ListDir" "/$EtcDir/$SourceList" "/$DpkgStatus" -type f -newer "$stamp" -print -quit)" ]; then
NEED_UPDATE_CHECK=yes
fi
else
if [ "$(find "/$StateDir/$ListDir" "/$EtcDir/$SourceList" -type f -print -quit)" ]; then
NEED_UPDATE_CHECK=yes
fi
fi
tmpfile=""
trap cleanup EXIT
tmpfile=$(mktemp -p $(dirname "$stamp"))
# should we hide esm-related information in the output
no_esm_file="/var/lib/update-notifier/hide-esm-in-motd"
if [ -e "$no_esm_file" ]; then
NO_ESM_MESSAGES="--no-esm-messages"
fi
# output something for update-motd
if [ "$NEED_UPDATE_CHECK" = "yes" ]; then
{
echo ""
/usr/lib/update-notifier/apt-check --human-readable "$NO_ESM_MESSAGES"
echo ""
} > "$tmpfile"
mv "$tmpfile" "$stamp"
chmod +r "$stamp"
fi