Got a bit of a 'poser' here for y'all, this time.
Following frenchiveruti's post here:-
http://www.murga-linux.com/puppy/viewto ... 994#978994
.....about how to put a desktop into 'suspend-to-RAM' mode (not a laptop), I've given the command a try:-
Code: Select all
echo -n mem > /sys/power/state
My Seagate external desktop drive is USB 3.0, plugged through a PCI-e 'adapter' card (which is not the issue; this works fine)...and is set to auto-mount its partitions at boot. Depending on the Pup, some mount this as sdc, some mount it as sdg. I have an elderly card-reader gizmo built-in, which invariably occupies mount points sdc, sdd, sde, sdf, or (sometimes) sdg. Some Pups see the Seagate before these, others see it after them.
Here's the problem. When I 'restore' the RAM state by use of the power button, all mounted partitions on the main internal drive are restored as they should be, on the same mount-points as when it went to sleep.
With the Seagate, if the partitions were mounted before 'suspend-to-RAM', upon power-up the previous mount-points are immediately replaced with the following pair of mount points. In other words, if it went to sleep as sdg1/2, it 'wakes-up' again as sdh1/2.
Which plays havoc with all my carefully set up sym-links!
If those 'new' mount-points are not mounted before 'suspend-to-RAM', it returns from 'sleep' with the same ones. So, I guess my main query is this:-
How can I make sure the external drive will 'wake-up' with the same mount-points as when it 'went to sleep'? In other words, what does Puppy do differently during the shut-down or boot processes that it doesn't do during 'suspend-to-RAM'/'waking-up' again?
I've tried modifying the script to first unmount, then remove the mount-points in question.....but this results in the old set of mount-points, plus a new set of mount-points, all showing up on the desktop as drive icons. The old ones no longer mount; the new ones will (of course), but the sym-links have to be manually re-established.....which is not what I want at all!
It currently looks like this:-
Code: Select all
#!/bin/sh
# Suspend Script
#
# To suspend Puppy's RAM state
#
#First, unmount remote drives
#
umount /mnt/sdc1
umount /mnt/sdc2
#
# Then, remove mount_points
#
rm /mnt/sdc1
rm /mnt/sdc2
#
# Finally, suspend to RAM
#
echo -n mem > /sys/power/state
Anybody got any ideas on this one?
Mike.