diff options
| author | Miloslav Trmac <mitr@volny.cz> | 2006-05-01 20:46:31 +0000 |
|---|---|---|
| committer | Miloslav Trmac <mitr@volny.cz> | 2006-05-01 20:46:31 +0000 |
| commit | de983ef109defa7c26081510f1a33bfae1d0b62d (patch) | |
| tree | 2ba3ab23f1fb5042c67a811be2404c81818129cc | |
| parent | 3d01c480921dbb89499f7f4353d9ce776b7ebd9a (diff) | |
Add support for diskdump to swap (#182272, patch by Keiichiro Tokunaga
<ktokunag@redhat.com>)
| -rwxr-xr-x | rc.d/rc.sysinit | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index 0b51f694..18791c93 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -348,9 +348,18 @@ if [ -f /etc/lvmtab ]; then fi fi +# Check if swap partition contains crash dump +swapdiskdump=0 +if [ -x /etc/init.d/diskdump ]; then + /etc/init.d/diskdump checkswapdump + swapdiskdump=$? +fi + # Start up swapping. -update_boot_stage RCswap -action $"Activating swap partitions: " swapon -a -e +if [ $swapdiskdump == 0 ]; then + update_boot_stage RCswap + action $"Activating swap partitions: " swapon -a -e +fi # Clear mtab > /etc/mtab @@ -699,6 +708,13 @@ chown root:root /tmp/.ICE-unix # Delete Postgres sockets rm -f /tmp/.s.PGSQL.* +# If swap partition has crash dump, save the dump from the swap partition to +# local filesystem and perform update_boot_stage here. +if [ $swapdiskdump == 1 ]; then + /etc/init.d/diskdump swapsavecore + update_boot_stage RCswap +fi + # Now turn on swap in case we swap to files. swapon -a action $"Enabling swap space: " /bin/true |
