HEX
Server: Apache/2.4.65 (Debian)
System: Linux web6 5.10.0-36-amd64 #1 SMP Debian 5.10.244-1 (2025-09-29) x86_64
User: innocamp (1028)
PHP: 7.4.33
Disabled: 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,
Upload Files
File: //usr/sbin/update-dlocatedb
#! /bin/sh

DPKGLIST='/var/lib/dlocate/dpkg-list'

pkgs=1
files=1

usage() {
[ -n "$*" ] && printf "%s\n" "$*" > /dev/stderr && exit 1

cat <<__EOF__
Usage:
      $0 [options]

Options:
    -p    Update the packages list only
    -f    Update the files list only
    -b    Update both (default)

    -h    This help message

__EOF__
exit 1
}

while getopts "pfbh" opt; do
    case "$opt" in
        p) pkgs=1  ; files='' ;;
        f) pkgs='' ; files=1 ;;
        b) pkgs=1  ; files=1 ;;
        h) usage ;;
        *) usage "%s\n" "Unknown option: '$opt'" ;;
    esac
done
shift $((OPTIND-1))

# See ionice(1)
if [ -x /usr/bin/ionice ]; then
  # don't run ionice if kernel version < 2.6.13
  KVER=$(uname -r)
  case "$KVER" in
    2.[012345]*) ;;

    2.6.[0-9])   ;;
    2.6.[0-9].*) ;;

    2.6.1[012]*) ;;

    # Redirect ionice output to /dev/null because VSERVER & OPENVZ
    # & probably other container environments don't like it.  See
    # Bug#456292
    *) ionice -c3 -p$$ > /dev/null 2>&1 ;;
  esac
fi

if [ -n "$files" ] ; then
  # update dlocate database
  test -x /usr/share/dlocate/updatedb && /usr/share/dlocate/updatedb >/dev/null
fi

if [ -n "$pkgs" ] ; then
  # update 'dlocate -l' emulation
  # use sed to convert first, second, and fourth space on each line of
  # dpkg -l to tab characters so we can use that as a field-sep in awk for
  # 'dlocate -l'.
  #
  # convert third space to a : for architecture
  dpkg -l "*" | 
    sed -e '1,5d; s/  */ /g; s/ /\t/; s/ /\t/; s/ /:/; s/ /\t/' | 
    sort -k2 | 
    uniq -f2 > "$DPKGLIST"
fi