Skip to content

Run emergency.sh as root when ran via .run_emergency handler - #6

Closed
yubaix wants to merge 1 commit into
KindleModding:mainfrom
yubaix:main
Closed

yubaix wants to merge 1 commit into
KindleModding:mainfrom
yubaix:main

Conversation

@yubaix

@yubaix yubaix commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Sadly, the extra shell file in sbin seems to be necessary, as I was unable to get working syntax into the sql file, for some reason.

Tested and working on KT6 5.19.6.

@ThatHackerDudeFromCyberspace

Copy link
Copy Markdown
Member

Why can't emergency.sh scripts of this format just call gandalf themselves?

@yubaix

yubaix commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Why can't emergency.sh scripts of this format just call gandalf themselves?

i mean they can, but imo it makes sense to do it this way. if you make an emergency.sh and it runs via upstart, you know it will run as root. if you make an emergency.sh and run it via this handler (rn), it will not run as root

the user has to figure out that it isn't running as root and call it themselves, which i think is awkward?

@ThatHackerDudeFromCyberspace

Copy link
Copy Markdown
Member

The idea is that this handler may be used if gandalf or any other kmc component is broken in some way, so the idea behind it was to prevent the usage of any KMC components

@yubaix

yubaix commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

The idea is that this handler may be used if gandalf or any other kmc component is broken in some way, so the idea behind it was to prevent the usage of any KMC components

makes sense

@ThatHackerDudeFromCyberspace

Copy link
Copy Markdown
Member

Maybe I should change it to call a differently named script so it's more obvious? This emergency.sh path isn't documented anyway tbh...

@yubaix

yubaix commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Maybe I should change it to call a differently named script so it's more obvious? This emergency.sh path isn't documented anyway tbh...

this is the stupid dumb messy ava path but you could have my root version that exists alongside a version with the current method that runs as framework, 🤷‍♀️ just saying ideas

@ThatHackerDudeFromCyberspace

Copy link
Copy Markdown
Member

yeah for sure... will keep this in mind for rootless

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants