File: update-grub.wrapper

package info (click to toggle)
grub 0.97-27etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 4,576 kB
  • ctags: 8,866
  • sloc: ansic: 38,787; sh: 5,559; asm: 2,014; makefile: 652; perl: 338
file content (25 lines) | stat: -rw-r--r-- 616 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
#
# Wrapper to warn user about kernel-img.conf move
#

if grep -q '  */sbin/update-grub$' /etc/kernel-img.conf 2> /dev/null ; then
	cat >&2 <<EOF
Your /etc/kernel-img.conf needs to be updated. Read grub's NEWS.Debian[1]
file and follow its instructions.

 1. /usr/share/doc/grub/NEWS.Debian.gz


EOF
fi

if [ -x /usr/sbin/update-grub ]; then
	if [ "$0" = "/sbin/update-grub" ]; then
		echo "You shouldn't call /sbin/update-grub. Please call /usr/sbin/update-grub instead!" >&2
		echo >&2
	fi
	exec /usr/sbin/update-grub "$@"
else
	echo "Your /usr is broken, please fix it before call this wrapper!" >&2
fi