Ubuntu Pastebin

Paste from ogra at Tue, 25 Aug 2015 19:00:32 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
if [ "$min_free_space" -lt "$free_space" ]; then
    echo "initrd: found more than 10% free space on disk, resizing ${writable_part}" >/dev/kmsg || true
    echo "initrd: partition to full disk size, see ${logfile} for details" >/dev/kmsg || true
    # grow our selected partition to max space available
    echo ", +"|/sbin/sfdisk -N $partition $device >>$logfile 2>&1
    # make sure we re read the partition table in any case
    /sbin/blockdev --rereadpt $device >>$logfile 2>&1
    # check the filesystem before attempting re-size
    /sbin/e2fsck -fy $writable_part >>$logfile 2>&1
    # resize the filesystem to full size of the partition
    /sbin/resize2fs -f $writable_part >>$logfile 2>&1
fi 
Download as text