.
Code: Select all
#!/bin/sh
# skips rc.shutdown and powers off computer without saving the session.
Xdialog --title "script $0" --yesno "\n\nPower-off computer WITHOUT saving?\n\n" 0 0
[ $? -eq 0 ] && rm /initrd/pup_ro1/etc/.XLOADED && rm /etc/.XLOADED
exec /bin/busybox poweroff
Can anyone add a refinement to it, so that if you press No it just closes the dialogue and you carry on as before?
Currently, it will shut down even if you press No, anyways if you drop the file in root and click on it you will see what I mean,
(caution, unmount any drives you have open, because it is as fast as a rat up a drainpipe and will power off your computer in a flash- even if you say NO
Oops, forum doesn't allow *.sh files, or txt files for that matter.