/usr/share/initramfs-tools/scripts/casper-functions is in casper 1.394.
This file is owned by root:root, with mode 0o644.
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 | . /scripts/functions
# Print a message and wait for enter
log_wait_msg()
{
if [ -x /bin/plymouth ] && plymouth --ping; then
plymouth message --text="$@"
plymouth watch-keystroke | read nunya
fi
_log_msg "Waiting: $@ ..."
}
lang2locale() {
langpart="${1%%_*}"
if [ "$1" != "C" ]; then
# Match the language code with 1st field in languagelist
line=$(grep -v "^#" /root/usr/share/localechooser/languagelist | cut -f1,3,4 -d\; | grep -v ';C$' | grep "^$langpart[_;]")
if [ -n "$line" ]; then
if [ "$(echo "$line" | grep -c '')" -gt 1 ]; then
# More than one match; try matching the
# country as well.
countrypart="${1#*_}"
if [ "$countrypart" = "$1" ]; then
countryline="$(echo "$line" | head -n1)"
echo "${countryline##*;}"
return
fi
countrypart="${countrypart%%[@.]*}"
countryline="$(echo "$line" | grep ";$countrypart;" | head -n1 || true)"
if [ "$countryline" ]; then
echo "${countryline##*;}"
return
fi
fi
echo "${line##*;}"
fi
else
echo "C"
fi
}
load_confmodule() {
# Only do this once.
if [ -z "$DEBCONF_REDIR" ]; then
exec <&4
export DEBIAN_HAS_FRONTEND=1
export DEBCONF_REDIR=1
fi
. /root/usr/share/debconf/confmodule
}
|