| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
PREREQ="" |
| 4 |
|
| 5 |
prereqs() |
| 6 |
{ |
| 7 |
echo "$PREREQ" |
| 8 |
} |
| 9 |
|
| 10 |
case $1 in |
| 11 |
# get pre-requisites |
| 12 |
prereqs) |
| 13 |
prereqs |
| 14 |
exit 0 |
| 15 |
;; |
| 16 |
esac |
| 17 |
|
| 18 |
# Hook to load keymaps into the initramfs if requested by KEYMAP="y" |
| 19 |
if [ "$KEYMAP" != "y" ] && [ "$KEYMAP" != "Y" ]; then |
| 20 |
exit 0 |
| 21 |
fi |
| 22 |
|
| 23 |
if [ ! -x /bin/setupcon ]; then |
| 24 |
echo "setupcon is missing. Please install the 'console-setup' package." |
| 25 |
exit 0 |
| 26 |
fi |
| 27 |
|
| 28 |
. /usr/share/initramfs-tools/hook-functions |
| 29 |
|
| 30 |
# Tell setupcon to copy/create the files it needs. |
| 31 |
setupcon --setup-dir "$DESTDIR" |
| 32 |
|
| 33 |
# Copy additional files that setupcon needs. We assume they are |
| 34 |
# executables. |
| 35 |
while read -r file; do |
| 36 |
copy_exec "$file" |
| 37 |
done < "$DESTDIR/morefiles" |
| 38 |
rm -f "$DESTDIR/morefiles" |
| 39 |
|
| 40 |
exit 0 |