mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-01-23 18:14:54 +08:00
32 lines
742 B
Bash
Executable File
32 lines
742 B
Bash
Executable File
#!/bin/sh -e
|
|
|
|
# do UID checking here so someone can at least get usage instructions
|
|
if [ "$EUID" != "0" ]; then
|
|
echo "error: This script must be run as root."
|
|
exit 1
|
|
fi
|
|
|
|
if [ `readlink /boot/kernel26.img` ] ;
|
|
then
|
|
echo "removing backward-symlink"
|
|
rm -v /boot/kernel26.img
|
|
fi
|
|
if [ `readlink /boot/kernel26-lts.img` ] ;
|
|
then
|
|
echo "removing backward-symlink"
|
|
rm -v /boot/kernel26-lts.img
|
|
fi
|
|
if [ `readlink /boot/vmlinuz26` ] ;
|
|
then
|
|
echo "removing backward-symlink"
|
|
rm -v /boot/vmlinuz26
|
|
fi
|
|
if [ `readlink /boot/vmlinuz26-lts` ] ;
|
|
then
|
|
echo "removing backward-symlink"
|
|
rm -v /boot/vmlinuz26-lts
|
|
fi
|
|
|
|
echo "Updating /boot/grub/grub.cfg"
|
|
exec grub-mkconfig -o /boot/grub/grub.cfg "$@"
|