#!/bin/sh if [ ! "$(id -u)" -eq 0 ]; then echo "Please execute this script as root." exit fi . ./02_SetVariables.sh if [ ! -f "$ROOTDIR"/initrd.img ]; then # If not accessible locally, get the finird from Slackware64 -15.0 from # a remote Slackware mirror cp /data/repos/slackware-15.0/EFI/BOOT/initrd.img "$ROOTDIR" || exit fi USER=$(stat -c %U .) rm -rf "$ROOTDIR"/initrd-tree mkdir "$ROOTDIR"/initrd-tree (cd "$ROOTDIR"/initrd-tree xz -dc "$ROOTDIR"/initrd.img | cpio -di du -sh rm -rf lib/modules/* du -sh ) chown -R "$USER": "$ROOTDIR"/initrd-tree