GIF89a;
Mass Deface Email Grabber
.hmac so needs a special treatment i="$KERNEL_DIR/.${KERNEL_IMAGE##*/}.hmac" if [[ -e "$i" ]]; then cp -aT "$i" "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac" fi fi /sbin/new-kernel-pkg --package "kernel${flavor}" --install "$KERNEL_VERSION" || exit $? /sbin/new-kernel-pkg --package "kernel${flavor}" --mkinitrd --dracut --depmod --update "$KERNEL_VERSION" || exit $? /sbin/new-kernel-pkg --package "kernel${flavor}" --rpmposttrans "$KERNEL_VERSION" || exit $? ;; remove) /sbin/new-kernel-pkg --package "kernel${flavor+-$flavor}" --rminitrd --rmmoddep --remove "$KERNEL_VERSION" || exit $? ;; *) ;; esac # exit, if we can't find a boot loader spec conforming setup if ! [[ -d /boot/loader/entries || -L /boot/loader/entries ]]; then exit 0 fi fi if [[ -f /etc/machine-id ]]; then read MACHINE_ID < /etc/machine-id fi if ! [[ $MACHINE_ID ]]; then echo "Could not determine your machine ID from /etc/machine-id." >&2 echo "Please run 'systemd-machine-id-setup' as root. See man:machine-id(5)" >&2 exit 1 fi if [[ ! $COMMAND ]] || [[ ! $KERNEL_VERSION ]]; then echo "Not enough arguments" >&2 exit 1 fi BOOT_DIR_ABS="/boot/$MACHINE_ID/$KERNEL_VERSION" ret=0 readarray -t PLUGINS < <( dropindirs_sort ".install" \ "/etc/kernel/install.d" \ "/usr/lib/kernel/install.d" ) case $COMMAND in add) if [[ ! "$KERNEL_IMAGE" ]]; then echo "Command 'add' requires an argument" >&2 exit 1 fi mkdir -p "$BOOT_DIR_ABS" || { echo "Could not create boot directory '$BOOT_DIR_ABS'." >&2 exit 1 } for f in "${PLUGINS[@]}"; do if [[ -x $f ]]; then "$f" add "$KERNEL_VERSION" "$BOOT_DIR_ABS" "$KERNEL_IMAGE" ((ret+=$?)) fi done ;; remove) for f in "${PLUGINS[@]}"; do if [[ -x $f ]]; then "$f" remove "$KERNEL_VERSION" "$BOOT_DIR_ABS" ((ret+=$?)) fi done rm -rf "$BOOT_DIR_ABS" ((ret+=$?)) ;; *) echo "Unknown command '$COMMAND'" >&2 exit 1 ;; esac exit $ret