From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Injected-Via-Gmane: http://gmane.org/ To: sisyphus@altlinux.ru From: Arioch Date: Sat, 06 Aug 2005 23:44:39 +0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: quoted-printable X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 212.26.238.75 User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050512) X-Accept-Language: en-us, en Sender: news Subject: [sisyphus] hibernate: cleanup after Software Suspend 2 X-BeenThere: sisyphus@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ALT Linux Sisyphus discussion list List-Id: ALT Linux Sisyphus discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2005 20:42:00 -0000 Archived-At: List-Archive: file:///usr/share/doc/hibernate-1.09/init.d/hibernate-cleanup.sh =FC=D4=CF=D4 =D3=CB=D2=C9=D0=D4 =DA=C1=DE=C9=DD=C1=C5=D4 =CD=C5=D3=D4=C1,= =C7=C4=C5 SwSusp2 =CD=CF=D6=C5=D4 =C8=D2=C1=CE=C9=D4=D8 =CF=C2=D2=C1=DA = =CF=D0=C5=D2=C1=D4=C9=D7=CB=C9. =F0=CF=D3=CB=CF=CC=D8=CB=D5 SwSusp2 =D3=CF=C8=D2=C1=CE=D1=C5=D4 =D7 =CF=C2= =D2=C1=DA =CB=DC=DB=C9 VFS - =D0=D2=C9 =CB=C1=D6=C4=CF=CA =DA=C1=C7=D2=D5= =DA=CB=C5=20 =D3=D4=C1=D2=D9=C5 =CF=C2=D2=C1=DA=D9 =CE=D5=D6=CE=CF =DA=C1=DE=C9=DD=C1=D4= =D8. =F5=D7=D9, =D1=C4=D2=CF =DC=D4=CF =C4=C5=CC=C1=C5=D4 =D4=CF=CC=D8=CB=CF =D0= =D2=C9 =CE=CF=D2=CD=C1=CC=D8=CE=CF=CD resume,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D4=C1 (=D4.=C5.=D5=D3=D4=C1=CE=CF=D7=CC=C5= =CE=CE=CF=CD=20 =D0=C1=CB=C5=D4=C5 hibernate) - =CF=DE=C5=D2=C5=C4=CE=CF=D3=D4=D8 mount -= a =C9 swapon =D7=CF=DA=D7=D2=C1=DD=C1=CC=C1=D3=D8 =CB =C2=CF=CC=C5=C5=20 =CB=CC=C1=D3=D3=C9=DE=C5=D3=CB=CF=CD=D5 =D7=C1=D2=C9=C1=CE=D4=D5. =F7=CF=CF=C2=DD=C5, =D7=D7=C9=C4=D5 =D0=CF=D4=C5=CE=C3.=CF=D0=C1=D3=CE=CF= =D3=D4=C9 =DA=C1=C7=D2=D5=DA=CB=C9 =D3=CF =D3=D4=C1=D2=D9=CD =CF=C2=D2=C1= =DA=CF=CD IMHO =CE=C1=C4=CF =DC=D4=CF=D4=20 =D3=CB=D2=C9=D0=D4 =D0=CF=CD=C5=DD=C1=D4=D8 =CE=C5 =D7 hibernate.rpm, =CB= =CF=D4=CF=D2=D9=CA =CD.=C2. =C0=DA=C5=D2 =C9 =CE=C5 =D0=CF=D3=D4=C1=D7=C9= =D4 - =C1=20 =D7 =D1=C4=D2=C1 =D3 =D0=CF=C4=C4=C5=D2=D6=CB=CF=CA SwSusp2. =EE=C9=D6=C5 =CD=CF=CA =D0=CF=C4=D0=D2=C1=D7=CC=C5=CE=CE=D9=CA rc.sysinit= (=D7=C1=D2=C9=C1=CE=D4 3): =2E..........skip......... # Initialize bootsplash subsystem. splash_init 5 splash_update start 1 # Set the system clock (when /etc/adjtime is missing) [ -s /etc/adjtime ] || /etc/init.d/clock start ## Arioch - swapon must be moved later, for SwSusp2/hibernate-cleanup SWSUSP2_CLEANUP=3D/etc/rc.d/scripts/hibernate-cleanup.sh if [ -x $SWSUSP2_CLEANUP ]; then echo "Hibernate cleanup script present - will not activate swap=20 partitions yet" else # Activate swap action "Activating swap partitions:" swapon -a -e fi ## /Arioch # Set the hostname action "Setting hostname $HOSTNAME:" hostname "$HOSTNAME" =2E..........skip......... if [ -x /sbin/quotaon ]; then action "Turning on user and group quotas for local=20 filesystems:" /sbin/quotaon -a fi ## Arioch: going on with SwSusp2 if [ -x $SWSUSP2_CLEANUP ]; then # action "Removing Software Suspend images, if any." $SWSUSP2_CLEANU= P # script itself prints looog greeting action "Hibernate: " $SWSUSP2_CLEANUP # Ugly, but it seems we do not want user, entering into single mode=20 without swap??? swapon -a -e fi ## /Arioch # Do the following while waiting for an 'I' from the user... { # Cleanup everything :) action "Cleaning up temporary files from previous boot:"=20 /etc/rc.d/scripts/cleanup # Language fixes /etc/rc.d/scripts/lang # Now turn on swap again (in case we swap to files) ## Arioch: and in case SwSusp2/Hibernate cleanup script present. ;-D splash_update swap 7 action "Activating swap space:" swapon -a # Initialize the serial ports ExecIfExecutable /etc/rc.d/rc.serial =2E..........skip......... =ED=CF=CE=D3=D4=D2=C9=CB =D4=CF=D4 =C5=DD=C5 =D0=CF=CC=D5=DE=C9=CC=D3=D1,= =CE=CF =D1 =D3=D4=C1=D2=C1=CC=D3=D1 =D0=CF =CD=C9=CE=C9=CD=D5=CD=D5 =CD=C5= =CE=D1=D4=D8 =D3=CC=CF=D6=C9=D7=DB=C9=C5=D3=D1=20 =D3=CB=D2=C9=D0=D4=D9 =C9 =D0=D2=CF=C3=C5=D3=D3 =DA=C1=C7=D2=D5=DA=CB=C9.=