diff options
author | Judd Vinet <judd@archlinux.org> | 2005-11-09 21:21:17 +0000 |
---|---|---|
committer | Judd Vinet <judd@archlinux.org> | 2005-11-09 21:21:17 +0000 |
commit | 71468248567e6bf1e794094d9b5f87ac61de033a (patch) | |
tree | 78b6f678577e5c76554cd97bc357565a5bcb525f /rc.sysinit | |
parent | f947ecffc4a9109d0790e5b2853e2a835b4cf81b (diff) | |
download | initscripts-71468248567e6bf1e794094d9b5f87ac61de033a.tar.xz |
added logic to free up initrd memory once it's not needed anymore
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-x | rc.sysinit | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -39,8 +39,13 @@ if [ -e /initrd/dev/mapper/root ]; then mkdir /dev/mapper 2>/dev/null cp -a /initrd/dev/mapper/root /dev/mapper/root fi -# Unmount the old initrd, if it exists -[ -d /initrd ] && umount /initrd 2>/dev/null +# Unmount and free up the old initrd if it exists +if [ -f /initrd/linuxrc ]; then + stat_busy "Freeing memory from initial ramdisk" + umount /initrd 2>/dev/null + /sbin/blockdev --flushbufs /dev/rd/0 2>/dev/null + stat_done +fi # TODO: set up non-root encrypted partition mappings |