Skip to content

Commit

Permalink
mxgrub: Install binary in path
Browse files Browse the repository at this point in the history
  • Loading branch information
pmenzel committed Jun 30, 2017
1 parent 6ae5d50 commit 2e08507
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions mxgrub/create_initramfs
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/sh

set -x

if [ -z "$1" ]; then
echo "You need to supply an initrd file name"
exit 1
Expand All @@ -12,7 +14,7 @@ INITRDPATH=/boot/grub/"$INITRDNAME".igz
INITRDDIR="$TMPDIR"/"$INITRDNAME"
mkdir -p "$INITRDDIR"
cd "$INITRDDIR"
mkdir -p "$DSDDIR"
mkdir -p "$DSTDIR"

if [ -d /lib/firmware/amd-ucode ]; then
cat /lib/firmware/amd-ucode/microcode_amd*.bin > "$DSTDIR"/AuthenticAMD.bin
Expand All @@ -22,7 +24,9 @@ if [ -d /lib/firmware/intel-ucode ]; then
cat /lib/firmware/intel-ucode/* > "$DSTDIR"/GenuineIntel.bin
fi

ls -ltr "$TMPDIR"
find . | cpio -o -H newc > "$TMPDIR"/ucode.cpio
ls -ltr "$TMPDIR"

cd ..

Expand All @@ -33,5 +37,5 @@ cd /project/admin/initramfs
find .|cpio -H newc -o | gzip > "$TMPDIR"/"$INITRDNAME"

#
cat ucode.cpio $INITRDNAME > /boot/grub/"$INITRDNAME"
cat "$TMPDIR"/ucode.cpio "$TMPDIR"/$INITRDNAME > /boot/grub/"$INITRDNAME"
rm "$TMPDIR"/ucode.cpio "$TMPDIR"/"$INITRDNAME"
2 changes: 1 addition & 1 deletion mxgrub/mxgrub
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ sub cmd_update {
}

sub cmd_initramfs {
sys('/project/mxtools/mxgrub/create_initramfs', 'initramfs');
sys('create_initramfs', 'initramfs');
}

our ($opt_list,$opt_update,$opt_initramfs,$opt_test);
Expand Down

0 comments on commit 2e08507

Please sign in to comment.