source: grub-pc/trunk/fuentes/debian/grub-common.init @ 22

Last change on this file since 22 was 22, checked in by mabarracus, 4 years ago

updated version and apply net.ifnames=0 into debian/rules

File size: 1.1 KB
Line 
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides:          grub-common
4# Required-Start:    $all
5# Required-Stop:
6# Default-Start:     2 3 4 5
7# Default-Stop:
8# Short-Description: Record successful boot for GRUB
9# Description:       GRUB displays the boot menu at the next boot if it
10#                    believes that the previous boot failed. This script
11#                    informs it that the system booted successfully.
12### END INIT INFO
13
14which grub-editenv >/dev/null 2>&1 || exit 0
15
16# Load the VERBOSE setting and other rcS variables
17. /lib/init/vars.sh
18
19# Define LSB log_* functions.
20# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
21. /lib/lsb/init-functions
22
23case $1 in
24    start|restart|force-reload)
25        [ "$VERBOSE" != no ] && log_action_msg "Recording successful boot for GRUB"
26        [ -s /boot/grub/grubenv ] || rm -f /boot/grub/grubenv
27        mkdir -p /boot/grub
28        grub-editenv /boot/grub/grubenv unset recordfail
29        [ "$VERBOSE" != no ] && log_end_msg $?
30        ;;
31    stop)
32        ;;
33    status)
34        exit 0
35        ;;
36    *)
37        echo "Usage: $0 {start|stop|status|restart|force-reload}" >&2
38        exit 3
39        ;;
40esac
41
42exit 0
Note: See TracBrowser for help on using the repository browser.