Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] added option to enable or disable reboot on ctrl-alt-del
@ 2016-01-02 22:25 lothar felten
  2016-01-03 20:56 ` Peter Korsgaard
  0 siblings, 1 reply; 3+ messages in thread
From: lothar felten @ 2016-01-02 22:25 UTC (permalink / raw)
  To: buildroot

From: felten <felten@vaxnet.de>

Signed-off-by: lothar felten <felten@vaxnet.de>
---
 package/skeleton/skeleton.mk | 12 ++++++++++++
 system/Config.in             | 10 ++++++++++
 2 files changed, 22 insertions(+)

diff --git a/package/skeleton/skeleton.mk b/package/skeleton/skeleton.mk
index d640e24..7c9d8ed 100644
--- a/package/skeleton/skeleton.mk
+++ b/package/skeleton/skeleton.mk
@@ -230,6 +230,18 @@ define SKELETON_SYSTEM_REMOUNT_RW
 endef
 endif
 TARGET_FINALIZE_HOOKS += SKELETON_SYSTEM_REMOUNT_RW
+ifeq ($(BR2_TARGET_GENERIC_ENABLE_CTRL_ALT_DEL),y)
+# Find commented line, if any, and remove leading '#'s
+define SKELETON_SYSTEM_ENABLE_CTRL_ALT_DEL
+	$(SED) '/^#.*ctrlaltdel.*$$/s~^#\+~~' $(TARGET_DIR)/etc/inittab
+endef
+else
+# Find uncommented line, if any, and add a leading '#'
+define SKELETON_SYSTEM_ENABLE_CTRL_ALT_DEL
+	$(SED) '/^[^#].*ctrlaltdel.*$$/s~^~#~' $(TARGET_DIR)/etc/inittab
+endef
+endif
+TARGET_FINALIZE_HOOKS += SKELETON_SYSTEM_ENABLE_CTRL_ALT_DEL
 endif # BR2_INIT_BUSYBOX || BR2_INIT_SYSV
 
 endif # BR2_ROOTFS_SKELETON_DEFAULT
diff --git a/system/Config.in b/system/Config.in
index 2e14971..e3ff125 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -347,6 +347,16 @@ config BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW
 	  read-only.
 	  If unsure, say Y.
 
+config BR2_TARGET_GENERIC_ENABLE_CTRL_ALT_DEL
+	bool "enable system reboot on ctrl-alt-del"
+	default y
+	help
+	  By default, pressing ctrl-alt-del will reboot the system by invoking
+	  the reboot command.
+	  Say no here if you would rather like your system to ignore the
+	  ctrl-alt-del combination.
+	  If unsure, say y.
+
 endif # BR2_ROOTFS_SKELETON_DEFAULT
 
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 1/1] added option to enable or disable reboot on ctrl-alt-del
  2016-01-02 22:25 [Buildroot] [PATCH 1/1] added option to enable or disable reboot on ctrl-alt-del lothar felten
@ 2016-01-03 20:56 ` Peter Korsgaard
  2016-01-03 21:52   ` Yann E. MORIN
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Korsgaard @ 2016-01-03 20:56 UTC (permalink / raw)
  To: buildroot

>>>>> "lothar" == lothar felten <felten@vaxnet.de> writes:

 > From: felten <felten@vaxnet.de>
 > Signed-off-by: lothar felten <felten@vaxnet.de>

I'm not sure this is something that needs to be tweaked often enough
(E.G. most systems don't have a keyboard connected), so I'm not sure we
want the clutter the system menu with the option.

Perhaps we should simply remove the ctrlaltdel handling of our inittabs,
as most people probably don't want it - And then just let the (few?)
people wanting it add it through an overlay / post-build script.

Comments anyony?

> ---
 >  package/skeleton/skeleton.mk | 12 ++++++++++++
 >  system/Config.in             | 10 ++++++++++
 >  2 files changed, 22 insertions(+)

 > diff --git a/package/skeleton/skeleton.mk b/package/skeleton/skeleton.mk
 > index d640e24..7c9d8ed 100644
 > --- a/package/skeleton/skeleton.mk
 > +++ b/package/skeleton/skeleton.mk
 > @@ -230,6 +230,18 @@ define SKELETON_SYSTEM_REMOUNT_RW
 >  endef
 >  endif
 >  TARGET_FINALIZE_HOOKS += SKELETON_SYSTEM_REMOUNT_RW
 > +ifeq ($(BR2_TARGET_GENERIC_ENABLE_CTRL_ALT_DEL),y)
 > +# Find commented line, if any, and remove leading '#'s
 > +define SKELETON_SYSTEM_ENABLE_CTRL_ALT_DEL
 > +	$(SED) '/^#.*ctrlaltdel.*$$/s~^#\+~~' $(TARGET_DIR)/etc/inittab
 > +endef
 > +else
 > +# Find uncommented line, if any, and add a leading '#'
 > +define SKELETON_SYSTEM_ENABLE_CTRL_ALT_DEL
 > +	$(SED) '/^[^#].*ctrlaltdel.*$$/s~^~#~' $(TARGET_DIR)/etc/inittab
 > +endef
 > +endif
 > +TARGET_FINALIZE_HOOKS += SKELETON_SYSTEM_ENABLE_CTRL_ALT_DEL
 >  endif # BR2_INIT_BUSYBOX || BR2_INIT_SYSV
 
 >  endif # BR2_ROOTFS_SKELETON_DEFAULT
 > diff --git a/system/Config.in b/system/Config.in
 > index 2e14971..e3ff125 100644
 > --- a/system/Config.in
 > +++ b/system/Config.in
 > @@ -347,6 +347,16 @@ config BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW
 >  	  read-only.
 >  	  If unsure, say Y.
 
 > +config BR2_TARGET_GENERIC_ENABLE_CTRL_ALT_DEL
 > +	bool "enable system reboot on ctrl-alt-del"
 > +	default y
 > +	help
 > +	  By default, pressing ctrl-alt-del will reboot the system by invoking
 > +	  the reboot command.
 > +	  Say no here if you would rather like your system to ignore the
 > +	  ctrl-alt-del combination.
 > +	  If unsure, say y.
 > +
 >  endif # BR2_ROOTFS_SKELETON_DEFAULT
 
 
 > -- 
 > 1.9.1

 > _______________________________________________
 > buildroot mailing list
 > buildroot at busybox.net
 > http://lists.busybox.net/mailman/listinfo/buildroot


-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 1/1] added option to enable or disable reboot on ctrl-alt-del
  2016-01-03 20:56 ` Peter Korsgaard
@ 2016-01-03 21:52   ` Yann E. MORIN
  0 siblings, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2016-01-03 21:52 UTC (permalink / raw)
  To: buildroot

Lothar, Peter, All,

On 2016-01-03 21:56 +0100, Peter Korsgaard spake thusly:
> >>>>> "lothar" == lothar felten <felten@vaxnet.de> writes:
> 
>  > From: felten <felten@vaxnet.de>
>  > Signed-off-by: lothar felten <felten@vaxnet.de>
> 
> I'm not sure this is something that needs to be tweaked often enough
> (E.G. most systems don't have a keyboard connected), so I'm not sure we
> want the clutter the system menu with the option.
> 
> Perhaps we should simply remove the ctrlaltdel handling of our inittabs,
> as most people probably don't want it - And then just let the (few?)
> people wanting it add it through an overlay / post-build script.
> 
> Comments anyony?

FTR, here's a repeat from IRC:

I do agree with Peter. Just disabling the 3-finger salute is OK for me.
As Lothar suggested, I don;t mind the line being kept as comments in the
inittabs.

Lothar, I'll mark your patch as "Changes Requested" in our patchwork.
Care to send an update, please?

Thanks!

Regards,
Yann E. MORIN.

> > ---
>  >  package/skeleton/skeleton.mk | 12 ++++++++++++
>  >  system/Config.in             | 10 ++++++++++
>  >  2 files changed, 22 insertions(+)
> 
>  > diff --git a/package/skeleton/skeleton.mk b/package/skeleton/skeleton.mk
>  > index d640e24..7c9d8ed 100644
>  > --- a/package/skeleton/skeleton.mk
>  > +++ b/package/skeleton/skeleton.mk
>  > @@ -230,6 +230,18 @@ define SKELETON_SYSTEM_REMOUNT_RW
>  >  endef
>  >  endif
>  >  TARGET_FINALIZE_HOOKS += SKELETON_SYSTEM_REMOUNT_RW
>  > +ifeq ($(BR2_TARGET_GENERIC_ENABLE_CTRL_ALT_DEL),y)
>  > +# Find commented line, if any, and remove leading '#'s
>  > +define SKELETON_SYSTEM_ENABLE_CTRL_ALT_DEL
>  > +	$(SED) '/^#.*ctrlaltdel.*$$/s~^#\+~~' $(TARGET_DIR)/etc/inittab
>  > +endef
>  > +else
>  > +# Find uncommented line, if any, and add a leading '#'
>  > +define SKELETON_SYSTEM_ENABLE_CTRL_ALT_DEL
>  > +	$(SED) '/^[^#].*ctrlaltdel.*$$/s~^~#~' $(TARGET_DIR)/etc/inittab
>  > +endef
>  > +endif
>  > +TARGET_FINALIZE_HOOKS += SKELETON_SYSTEM_ENABLE_CTRL_ALT_DEL
>  >  endif # BR2_INIT_BUSYBOX || BR2_INIT_SYSV
>  
>  >  endif # BR2_ROOTFS_SKELETON_DEFAULT
>  > diff --git a/system/Config.in b/system/Config.in
>  > index 2e14971..e3ff125 100644
>  > --- a/system/Config.in
>  > +++ b/system/Config.in
>  > @@ -347,6 +347,16 @@ config BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW
>  >  	  read-only.
>  >  	  If unsure, say Y.
>  
>  > +config BR2_TARGET_GENERIC_ENABLE_CTRL_ALT_DEL
>  > +	bool "enable system reboot on ctrl-alt-del"
>  > +	default y
>  > +	help
>  > +	  By default, pressing ctrl-alt-del will reboot the system by invoking
>  > +	  the reboot command.
>  > +	  Say no here if you would rather like your system to ignore the
>  > +	  ctrl-alt-del combination.
>  > +	  If unsure, say y.
>  > +
>  >  endif # BR2_ROOTFS_SKELETON_DEFAULT
>  
>  
>  > -- 
>  > 1.9.1
> 
>  > _______________________________________________
>  > buildroot mailing list
>  > buildroot at busybox.net
>  > http://lists.busybox.net/mailman/listinfo/buildroot
> 
> 
> -- 
> Bye, Peter Korsgaard
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-01-03 21:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-02 22:25 [Buildroot] [PATCH 1/1] added option to enable or disable reboot on ctrl-alt-del lothar felten
2016-01-03 20:56 ` Peter Korsgaard
2016-01-03 21:52   ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox