[arch-general] [PATCH 45/48] Sleep instead of rebooting or shutting down when debugging initscripts

Thomas Bächler thomas at archlinux.org
Fri Jul 16 08:10:22 EDT 2010


Am 30.06.2010 23:47, schrieb Victor Lowther:
> ---
>  functions   |    2 +-
>  rc.shutdown |    3 +++
>  2 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/functions b/functions
> index f1dce8a..2c80a59 100644
> --- a/functions
> +++ b/functions
> @@ -4,7 +4,7 @@
>  
>  # width:
>  
> -grep -q initdebug && {
> +grep -q initdebug /proc/cmdline && {
>      exec 2>/dev/tty9
>  }
>  
> diff --git a/rc.shutdown b/rc.shutdown
> index 1081970..96b10f0 100755
> --- a/rc.shutdown
> +++ b/rc.shutdown
> @@ -93,6 +93,9 @@ run_hook shutdown_poweroff
>  
>  # Power off or reboot
>  printsep
> +
> +grep -q initdebug /proc/cmdline && sleep 9999
> +
>  if [[ $RUNLEVEL = 0 ]]; then
>  	printhl "${C_H2}POWER OFF"
>  	/sbin/poweroff -d -f -h -i

Seems nice. I'll still omit the initdebug patches for now and rethink
this, for some reason I don't like this yet.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.archlinux.org/pipermail/arch-general/attachments/20100716/986a5a7d/attachment.bin>


More information about the arch-general mailing list