Reboot Command

More
21 Nov 2023 00:14 #286119 by Cyber
Reboot Command was created by Cyber
How can I issue a reboot command to the mesa's card? any recommendations  

Please Log in or Create an account to join the conversation.

More
21 Nov 2023 00:33 #286124 by snowgoer540
Replied by snowgoer540 on topic Reboot Command
What are you trying to achieve? If you are trying to reboot after updating the firmware that won’t work as it requires a power cycle.
The following user(s) said Thank You: Cyber

Please Log in or Create an account to join the conversation.

More
21 Nov 2023 00:37 #286125 by Cyber
Replied by Cyber on topic Reboot Command
Thank you for replying, I'm actually trying to write a script to remotely reboot a CNC machine

Please Log in or Create an account to join the conversation.

More
21 Nov 2023 01:06 - 21 Nov 2023 01:38 #286127 by snowgoer540
Replied by snowgoer540 on topic Reboot Command
sudo shutdown -r now

Will reboot a machine.

 
Last edit: 21 Nov 2023 01:38 by snowgoer540. Reason: add sudo... oops
The following user(s) said Thank You: Cyber

Please Log in or Create an account to join the conversation.

More
21 Nov 2023 01:30 #286130 by tommylight
Replied by tommylight on topic Reboot Command
So does
sudo reboot
and both require sudo and password, otherwise they do not work.
The following user(s) said Thank You: snowgoer540, Cyber

Please Log in or Create an account to join the conversation.

More
21 Nov 2023 01:39 #286132 by snowgoer540
Replied by snowgoer540 on topic Reboot Command

So does
sudo reboot


Thank you for reminding me I forgot sudo...

and both require sudo and password, otherwise they do not work.

On a PathPilot machine, this is not true. both sudo shutdown -r now and sudo reboot will work without being prompted for a password.

Please Log in or Create an account to join the conversation.

More
21 Nov 2023 10:08 #286155 by rodw
Replied by rodw on topic Reboot Command
That can be setup by placing a file in /etc/sudoers.d
With Linuxcnc's raspberry pi Bookworm installer, this was the default behaviour and we removed the feature. (by deleting the user's file)

I think this link explains how to do it. But what would I know I only undid it!
forums.bunsenlabs.org/viewtopic.php?id=5503

This was our script to remove the file created by the default installer. 
rm -f /p2/etc/sudoers.d/010_${USERNAME}-nopasswd
The following user(s) said Thank You: Cyber

Please Log in or Create an account to join the conversation.

More
21 Nov 2023 21:51 #286199 by snowgoer540
Replied by snowgoer540 on topic Reboot Command
That’s good to know, I will likely do that on my plasma and VMs.  Typing the password is annoying.

Thanks for the heads up Rod.
The following user(s) said Thank You: tommylight, rodw

Please Log in or Create an account to join the conversation.

Moderators: cncbasher
Time to create page: 0.148 seconds
Powered by Kunena Forum