~ubuntu-branches/ubuntu/maverick/kexec-tools/maverick

« back to all changes in this revision

Viewing changes to debian/patches/coldreboot.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Loïc Minier
  • Date: 2010-05-22 22:13:09 UTC
  • mfrom: (2.2.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100522221309-8obp68ou2wbwqm72
Tags: 1:2.0.1-2ubuntu1
* Drop debian/commit-templates/patch, unused.
* Drop upgrade snippet for versions older than the lucid one.
* Merge with Debian.
  - Drop dpatch arm-fix-architecture-detection, included in Debian as
    arm_arch dpatch.
  - Remaining changes:
    + Run aclocal during build; build-dep on automake1.9.
    + Add and install kdump init script and initramfs snippet; depend on
      initramfs-tools and call the update-initramfs trigger.  Also call
      update-grub after update-initramfs trigger.
    + Default to not kexecing a kernel on boot in the automatically
      generated conffile.
    + Add arm-higher-initrd-load-addr dpatch to bump initrd load offset from
      0x800000 to 0x8000000 since our kernels are so big that they overwrite
      the initrd when they uncompress; fixes kexec initrd support on all ARM
      Ubuntu kernels; LP #568283.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh /usr/share/dpatch/dpatch-run
 
2
## coldreboot.dpatch by  <khalid@debian.org>
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: This patch adds a cold reboot script which can be used to force a cold
 
6
## DP: reboot instead of a kexec reboot
 
7
 
 
8
@DPATCH@
 
9
diff -urNp kexec-tools-build//kexec/coldreboot kexec-tools-new//kexec/coldreboot
 
10
--- kexec-tools-build//kexec/coldreboot 1969-12-31 17:00:00.000000000 -0700
 
11
+++ kexec-tools-new//kexec/coldreboot   2010-04-22 11:13:26.000000000 -0600
 
12
@@ -0,0 +1,6 @@
 
13
+#!/bin/sh
 
14
+NOKEXECFILE=/tmp/no-kexec-reboot
 
15
+
 
16
+/bin/rm -f $NOKEXECFILE
 
17
+touch $NOKEXECFILE
 
18
+/sbin/reboot $*
 
19
diff -urNp kexec-tools-build//kexec/coldreboot.8 kexec-tools-new//kexec/coldreboot.8
 
20
--- kexec-tools-build//kexec/coldreboot.8       1969-12-31 17:00:00.000000000 -0700
 
21
+++ kexec-tools-new//kexec/coldreboot.8 2010-04-22 11:39:43.000000000 -0600
 
22
@@ -0,0 +1,25 @@
 
23
+.\" Process this file with
 
24
+.\" groff -man -Tascii coldreboot.8
 
25
+.\"
 
26
+.TH kexec 8 "April 2006" Linux "User Manuals"
 
27
+.SH NAME
 
28
+coldreboot \- Force a cold reboot bypassing kexec-tools default
 
29
+.SH SYNOPSIS
 
30
+.B /sbin/coldreboot
 
31
+.B [reboot options] 
 
32
+
 
33
+.SH DESCRIPTION
 
34
+.B coldreboot
 
35
+is a script that forces a cold reboot regardless of whether kexec is enabled
 
36
+or not in /etc/default/kexec
 
37
+.B coldreboot
 
38
+takes the same arguments as /sbin/reboot and passes them on to /sbin/reboot 
 
39
+later.
 
40
+
 
41
+.SH NOTES
 
42
+.PP
 
43
+.B coldreboot 
 
44
+prevents a kexec kernel from being loaded automatically and thus
 
45
+forces a cold reboot. If the user loads a kexec kernel by hand, 
 
46
+.B coldreboot 
 
47
+will still result in a kexec reboot.
 
48
diff -urNp kexec-tools-build//kexec/Makefile kexec-tools-new//kexec/Makefile
 
49
--- kexec-tools-build//kexec/Makefile   2008-10-08 16:32:14.000000000 -0600
 
50
+++ kexec-tools-new//kexec/Makefile     2010-04-22 15:06:33.000000000 -0600
 
51
@@ -65,6 +65,8 @@ clean += $(KEXEC_OBJS) $(KEXEC_DEPS) $(K
 
52
 
 
53
 KEXEC = $(SBINDIR)/kexec
 
54
 KEXEC_MANPAGE = $(MANDIR)/man8/kexec.8
 
55
+KEXEC_COLDREBOOT=$(SBINDIR)/coldreboot
 
56
+KEXEC_COLDREBOOT_MANPAGE=$(MANDIR)/man8/coldreboot.8
 
57
 
 
58
 -include $(KEXEC_DEPS)
 
59
 
 
60
@@ -77,6 +79,16 @@ $(KEXEC): CPPFLAGS+=-I$(srcdir)/kexec/ar
 
61
 $(KEXEC_MANPAGE): kexec/kexec.8
 
62
        @$(MKDIR) -p     $(MANDIR)/man8
 
63
        cp kexec/kexec.8 $(KEXEC_MANPAGE)
 
64
+
 
65
+$(KEXEC_COLDREBOOT): kexec/coldreboot
 
66
+       @$(MKDIR) -p     $(@D)
 
67
+       cp kexec/coldreboot $(KEXEC_COLDREBOOT)
 
68
+       /bin/chmod 755 $(KEXEC_COLDREBOOT)
 
69
+
 
70
+$(KEXEC_COLDREBOOT_MANPAGE): kexec/coldreboot.8
 
71
+       @$(MKDIR) -p     $(MANDIR)/man8
 
72
+       cp kexec/coldreboot.8 $(KEXEC_COLDREBOOT_MANPAGE)
 
73
+
 
74
 echo::
 
75
        @echo "KEXEC_SRCS $(KEXEC_SRCS)"
 
76
        @echo "KEXEC_DEPS $(KEXEC_DEPS)"
 
77
diff -urNp kexec-tools-build//Makefile.in kexec-tools-new//Makefile.in
 
78
--- kexec-tools-build//Makefile.in      2010-04-22 11:05:48.000000000 -0600
 
79
+++ kexec-tools-new//Makefile.in        2010-04-22 14:40:06.000000000 -0600
 
80
@@ -106,11 +106,13 @@ PKGINCLUDEIR=$(INCLUDEDIR)/$(PACKAGE_NAM
 
81
 
 
82
 MAN_PAGES:= $(MANDIR)/man8/kexec.8
 
83
 MAN_PAGES+= $(MANDIR)/man8/kdump.8
 
84
+MAN_PAGES+= $(MANDIR)/man8/coldreboot.8
 
85
 BINARIES_i386:=  $(SBINDIR)/kexec $(PKGLIBDIR)/kexec_test.static
 
86
 BINARIES_x86_64:=$(SBINDIR)/kexec $(PKGLIBDIR)/kexec_test.static
 
87
 BINARIES:=$(SBINDIR)/kexec $(SBINDIR)/kdump $(BINARIES_$(ARCH))
 
88
+SCRIPTS:=$(SBINDIR)/coldreboot
 
89
 
 
90
-TARGETS:=$(BINARIES) $(MAN_PAGES)
 
91
+TARGETS:=$(BINARIES) $(MAN_PAGES) $(SCRIPTS)
 
92
 
 
93
 all: $(TARGETS)
 
94