installer-feature-add-memtest-0.3/000075500000000000000000000000001116074006200171775ustar00rootroot00000000000000installer-feature-add-memtest-0.3/Makefile000064400000000000000000000001561116074006200206410ustar00rootroot00000000000000install2_dir = $(datadir)/install2 install: install -d $(install2_dir) cp -a postinstall.d $(install2_dir) installer-feature-add-memtest-0.3/postinstall.d/000075500000000000000000000000001116074006200217755ustar00rootroot00000000000000installer-feature-add-memtest-0.3/postinstall.d/50-add-memtest000075500000000000000000000021011116074006200243430ustar00rootroot00000000000000#!/bin/sh -efu # if memtest86/memtest86+ is installed as a part of base system, # its %post is effectively skipped (installkernel won't run with # DURING_INSTALL set -- which is the case for first and second # installation stages) # thanks led@ for the simpler implementation suggestion . install2-init-functions # Find most fresh memtest version. MEMTEST="$(find $destdir/boot/ -mindepth 1 -maxdepth 1 -name 'memtest-*.bin' -printf '%f\n' |sort -u |tail -n1)" [ -n "$MEMTEST" ] || exit 0 MEMTEST="${MEMTEST#memtest-}" MEMTEST="${MEMTEST%.bin}" lilo_conf=/etc/lilo.conf if [ -f "$destdir$lilo_conf" ]; then # Add entry for memtest but don't run lilo yet. DURING_INSTALL= exec_chroot installkernel -n -m "$MEMTEST" # If there is exactly one entry for memtest, rename it to "memtest", # to avoid translation fuzz in boot menu. if [ "$(grep -c '^[[:space:]]*label="memtest.*"' "$destdir$lilo_conf")" = 1 ]; then exec_chroot sed -i 's/^\([[:space:]]*label="memtest\).*"/\1"/' "$lilo_conf" fi exec_chroot /sbin/lilo else DURING_INSTALL= exec_chroot installkernel -m "$MEMTEST" fi