diff options
author | crocket <crockabiscuit@gmail.com> | 2013-02-09 12:04:22 -0600 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2013-02-14 00:26:49 -0600 |
commit | 661367a458352f9934c475a028a915a9e45c93aa (patch) | |
tree | 24d3e95b285c42bf818b67e9e81a8b98722c363a | |
parent | 941e758282a5ffb5537671e7a09644b5d413766e (diff) | |
download | slackbuilds-661367a458352f9934c475a028a915a9e45c93aa.tar.gz |
system/grub2: Added update-grub script.
Signed-off-by: Erik Hanson <erik@slackbuilds.org>
-rw-r--r-- | system/grub2/grub2.SlackBuild | 2 | ||||
-rw-r--r-- | system/grub2/update-grub | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/system/grub2/grub2.SlackBuild b/system/grub2/grub2.SlackBuild index 13819cac23..c951e92c4a 100644 --- a/system/grub2/grub2.SlackBuild +++ b/system/grub2/grub2.SlackBuild @@ -74,6 +74,8 @@ CXXFLAGS="$SLKCFLAGS" \ make make install DESTDIR=$PKG +cp $CWD/update-grub $PKG/usr/bin + mkdir -p $PKG/etc/default cat $CWD/etc.default.grub > $PKG/etc/default/grub diff --git a/system/grub2/update-grub b/system/grub2/update-grub new file mode 100644 index 0000000000..9f59590ef8 --- /dev/null +++ b/system/grub2/update-grub @@ -0,0 +1,9 @@ +#!/bin/sh + +GRUB_MKCONFIG=$(which grub-mkconfig) + +if [ -e /boot/grub/grub.cfg ]; then + mv -n /boot/grub/grub.cfg /boot/grub/grub.cfg.old.$$ || exit 1 +fi + +$GRUB_MKCONFIG -o /boot/grub/grub.cfg $@ |