-
Notifications
You must be signed in to change notification settings - Fork 64
custom reboot #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
custom reboot #119
Conversation
| static async SetBootOption(id) { | ||
| try { | ||
| let [status, stdout, stderr] = await ExecCommand( | ||
| ['/usr/bin/pkexec', '/usr/sbin/grub-reboot', id], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
grub-reboot? It doesn't seem to be correct here for systemd boot. bootctl set-oneshot should be here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also an issue reflected in the 'upstream', thanks for reminding me. I don't use systemd-boot so haven't tested this yet.
| 'pkexec', | ||
| 'sh', | ||
| '-c', | ||
| `/usr/bin/cp ${Extension.lookupByUUID('hibernate-status@dromi').path}/customreboot/42_custom_reboot /etc/grub.d/42_custom_reboot && /usr/bin/chmod 755 /etc/grub.d/42_custom_reboot && /usr/sbin/update-grub` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The update-grub command has been replaced by grub-mkconfig: https://git.savannah.gnu.org/cgit/grub.git/tree/NEWS#n537
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll change this, thanks.
|
I don't think that quick reboot functionality is good in the current form. Regenerating the grub config needs extra caution, because it can break boot, especially with custom configs. And the timeout will remain disabled if e.g. the user logs in into a session other than GNOME after reboot, or not authenticated to run the command to reconfigure grub. I think it would better to drop this functionality. |
|
The code in its current from mostly comes from https://extensions.gnome.org/extension/5542/custom-reboot/, I do agree about the issue with disabling the timeout |
| if (bootOps !== undefined) { | ||
| this._itemsSection = new PopupMenu.PopupMenuSection(); | ||
|
|
||
| for (let [title, id] of bootOps) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
title and id fields are swapped here. systemdBoot.js and efibootmgr.js sets the id as first parameter, and title is the second parameter.
|
Generally, I think it would better to implement this functionality based on the D-Bus interface of systemd-logind. You can get the boot loader entries by reading UPDATE: For the reboot, it would better to use the |
Addresses #112