Opened 11 years ago
Closed 11 years ago
Last modified 11 years ago
#8160 closed defect (fixed)
Shutdown with user script from menu broken in trunk
Reported by: | chrisl | Owned by: | JYA |
---|---|---|---|
Priority: | major | Milestone: | 0.23 |
Component: | MythTV - General | Version: | head |
Severity: | medium | Keywords: | shutdown |
Cc: | Ticket locked: | no |
Description
I upgraded from .22-fixes to trunk, and my shutdown script is no longer called when I select "Yes, Exit and Shutdown" from the exit menu. It ignores my script and simply shuts down.
Strangely my shutdown script gets called when I press menu from the main menu to get the System Menu and select "Shutdown" from that menu. It just doesn't work from the exit menu.
Attachments (2)
Change History (12)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Milestone: | unknown → 0.23 |
---|---|
Owner: | changed from Isaac Richards to JYA |
Priority: | minor → major |
Status: | new → assigned |
Changed 11 years ago by
Attachment: | use_user_shutdown_script.patch added |
---|
comment:4 Changed 11 years ago by
I think if you are going to invert those settings, then you should also make sure that HaltCommand? and RebootCommand? are set to empty initially in mythfrontend rather than being filled with 'halt' and 'reboot' respectively.
Changed 11 years ago by
Attachment: | set_default_values.patch added |
---|
comment:6 Changed 11 years ago by
Good idea. I attached a patch that sets the halt and reboot command blank by default, so that if the user does not have a custom script then it will shutdown via the managed session if available.
comment:7 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Use user configured scripts to reboot/shutdown if they are configured before trying other methods. For backward compatibility reasons, the scripts are initialised by default ; most users will want to clear the settings to use d-bus/hal. Patch by chrisl
comment:8 Changed 11 years ago by
Resolution: | fixed |
---|---|
Status: | closed → new |
I can understand for compatibility reasons wanting to still support user scripts. But if "most users" will want to clear the settings by default, shouldn't they just not be initialized as was done in chrisl's second patch?
Note: that will *only* affect new frontends that don't contain settings in the DB.
The whole point of the original patch was to make the shutdown experience better for more users, and this will defeat that purpose.
comment:9 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
I agree 100% with you...
But no need to re-open the ticket... this ticked is resolved ; it fixes the problem reported originally.
This belongs to a different ticket now.
I haven't given hope of removing the default user scripts. Just need approval from other devs to incorporate that change
comment:10 Changed 11 years ago by
(In [25433]) Fixes #8291. Remove the default values for the "Reboot command" and "Halt command" settings.
The given values likely will not work on most systems without at least a sudo (and possibly path information), and including default values prevents dbus shutdown from working. Therefore, more systems are likely to just do the right thing without the default values. Users wanting to use a script can simply provide the appropriate command invocation (which is almost definitely different from the former default values). This change will only affect new setups, not existing setups. Refs #8160. Refs #7749.
This bug was initiated in ticket #7749.
If the user is running under a managed session, then the user's shutdown script will be ignored.
The logic for shutting down should be first to use the user shutdown script if provided. If not, then use the D-Bus shutdown, and the last option is shutdown with a hardcoded halt.