Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#9102 closed defect (fixed)

Failing myth_system command during shutdown or reboot doesn't try dbus

Reported by: superm1@… Owned by: paulh
Priority: minor Milestone: 0.24.1
Component: MythTV - General Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Currently, if a user defines a Halt Command or Reboot Command they're attempted first when shutdown or reboot are selected. If the command exits a non-zero return value, the function simply fails rather than continuing to try other venues.

The attached patch modifies this behavior:
0) Set return value to -1
1) Check for an empty command
2a) If non-empty, run myth_system, set return value
2b) If empty, go to 3
3) If the return value was non-zero, try Dbus
4) If dbus fails, try a hardcoded /sbin/halt etc

Attachments (2)

proper_shutdown_behavior_for_ubuntu.patch (1.3 KB) - added by superm1@… 4 years ago.
patch to modify shutdown behavior
proper_shutdown_behavior_for_ubuntu.2.patch (1.9 KB) - added by superm1@… 3 years ago.
updated for sphery's comments in #mythtv

Download all attachments as: .zip

Change History (6)

Changed 4 years ago by superm1@…

patch to modify shutdown behavior

comment:1 Changed 3 years ago by robertm

  • Owner set to paulh
  • Status changed from new to assigned

Paul, not sure if you're the best one to pass this to, please bounce it back if you're not interested.

Changed 3 years ago by superm1@…

updated for sphery's comments in #mythtv

comment:2 Changed 3 years ago by paulh

  • Milestone changed from unknown to 0.24.1
  • Resolution set to Fixed
  • Status changed from assigned to closed

(In 4138b324fd7a)

When shutting down or rebooting keep trying alternate methods if the first ones fail.

The order is user specified command, Dbus then hard coded halt command. Fixes #9102.

comment:3 Changed 3 years ago by paulh

( In ad3c81f086aa)

When shutting down or rebooting keep trying alternate methods if the first ones fail.

The order is user specified command, Dbus then hard coded halt command. Fixes #9102.
(cherry picked from commit 4138b324fd7a8c7d9313859e54d4944c55e02519)

comment:4 Changed 3 years ago by Paul Harrison

  • Resolution changed from Fixed to fixed

When shutting down or rebooting keep trying alternate methods if the first ones fail.

The order is user specified command, Dbus then hard coded halt command. Fixes #9102.

Changeset: 4138b324fd7a8c7d9313859e54d4944c55e02519

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.