/usr/sbin/prelink is in prelink 0.0.20131005-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 | #!/bin/bash
#
# Prelink wrapper script
# Author: Andres Roldan <aroldan@debian.org>
# Needed to avoid annoying message in coreutils >= 6.0
export LC_ALL='C'
# Recommended minimun free space, 50MB
min_size=50000
will_prelink="$(for i in $(awk '! /#/ && ! /^-b/ && NF >= 1 {print $NF}' < /etc/prelink.conf); do test -e "$i" && echo "$i"; done)"
have_warn=0
df -P $will_prelink | sort | uniq | {
have_warn=0
while read part x x size x mount_point; do
if $(echo $part | grep -qv "^/"); then
continue;
fi
if [ $size -le "$min_size" ]; then
echo "Partition $part ($mount_point) has only $size KB free." >&2
have_warn=1
fi
done
exit $have_warn # Exit from piped subshell
}
if [ "$?" -eq "1" ]; then
answer="No"
if [ -t 1 ]; then
echo
echo "!! WARNING !!"
echo "It's recommended to have at least $min_size KB of disk space."
echo "Prelink would _really_ damage the ELF files on those partitions."
read -t 20 -p "Do you really want to run prelink? (yes/No): " answer
fi
if [ "$answer" = "yes" ]; then
echo "You were warned. Running prelink..."
exec /usr/sbin/prelink.bin "$@"
else
echo
echo "Aborting prelink."
exit 1
fi
fi >&2
exec /usr/sbin/prelink.bin "$@"
|