/usr/share/drbl/bin/pkg-ver-latest is in drbl 2.8.25-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | #!/bin/bash
#-------------------------------------------------------------------------------
# This program is borrowed from http://staff.washington.edu/corey/new-patches.cgi
# The original author:
# Corey Satten, corey @ cac.washington.edu, 06/26/03, release 1.8
# For the latest version visit: http://staff.washington.edu/corey/tools.html
#
# Modified by: Blake Huang, Steven Shiau and Ceasar Sun for DRBL
#
# Find all installed packages with patches
# "$NEWER" is in drbl-functions
# Load DRBL setting and functions
# Setting
# Source function library.
[ -f /etc/rc.d/init.d/functions ] && . /etc/rc.d/init.d/functions
# Load DRBL setting and functions
DRBL_SCRIPT_PATH="${DRBL_SCRIPT_PATH:-/usr/share/drbl}"
. $DRBL_SCRIPT_PATH/sbin/drbl-conf-functions
#
(
# Note! Here we must use gawk, not awk (mawk which exists in Debian)
gawk "$NEWER"' # omit all but newest of multiple available patches
{ L0=R0; L1=R1; L2=R2
R0=$0
# For RedHat/Fedora
# Ex. kernel-smp#2.6.9-1.681_FC3
# R1: 2.6.9-1.681_FC3
# R2: kernel-smp
# For MDK:
# Ex. kernel-smp-2.4.22.37mdk
# R1: 2.4.22.37mdk
# R2: kernel-smp
# For Debian:
# Ex. kernel-image-2.6.8-2-686
# R1: 2.6.8-2-686
# R2: kernel-image
# For Ubuntu:
# Ex. linux-image-2.6.8-2-686
# R1: 2.6.8-2-686
# R2: linux-image
R1=$0; sub(/^(kernel|linux)(|-smp|-image|-PAE)[#-]/,"",R1) # pkg version
R2=$0; sub(/[#-]+[0-9]+.*$/,"",R2) # pkg name
#printf("before newer: '%s':'%s':'%s':'%s':'%s'\n",R0,R1,R2,L1,L2);
if ((R2 == L2) && newer(R1, L1)) {R0=L0; R1=L1}
if ((R2 != L2) && L0) {print L0}
}
END { print R0 }'
)
|