Save or not at shutdown - the real possibility of choice
Posted: 20 Apr 2018, 00:45
This is not really a bug report, but it is a bug if we consider bug a function that does not do what it should do really.
"Accidentaly," I observed in /mnt/live/cleanup file the following:
So, at shutdown this message appears, and we have 3 seconds to press "any other key" to prevent saving the changes. Only I am sure the an average user does not even notice this message, and even he notices, he should be very vigilant and fast to be able to make a good decision. Why is this a problem for me? Because if you have a well set system, in most of the cases, there is no any reason to save the changes at shutdown, to wear your storage device...
I edited the file: replaced the above code with the following:
But /mnt/live/cleanup file is not saved when using persistence. So, I entered into /../../changes/etc/rc.d/rc-local file:
"Accidentaly," I observed in /mnt/live/cleanup file the following:
Code: Select all
# Save 'changes=EXIT:' session:
if [ -e /tmp/changes-exit ]; then
echo -e "Your session will be saved in [1;33m3[0m seconds.\nPress space/enter to start doing it now or any other key to skip."; x=3
while [ $x -gt 0 ]; do read -s -t1 -n1 ans && break || sleep 1; let x=x-1; done
I edited the file: replaced the above code with the following:
Code: Select all
# Save 'changes=EXIT:' session:
if [ -e /tmp/changes-exit ]; then
echo -e "Do you want to save your session?\nPress space/enter if yes or any other key to skip."
read -rsn1 ans
Code: Select all
sed -i '/Your session will be saved/c\ echo -e \"Do you want to save your session?\\nPress space/enter if yes or any other key to skip.\"' /mnt/live/cleanup
sed -i '/do read -s -t1 -n1 ans/c\ read -rsn1 ans' /mnt/live/cleanup