4 RESIZE_MODE="background"
6 if [ -f /etc/default/resizefs ]; then
7 . /etc/default/resizefs
12 lxc-is-container && exit 0
13 [ -e /dev/root ] || exit 0
18 { echo "failed growing /dev/root"; exit 1; }
20 # here we have to use start-stop-daemon or the resize
21 # process gets killed when rc.sysinit ends (LP: #1261710)
22 case "$RESIZE_MODE" in
24 cirros-per once resize-rootfs -- \
25 start-stop-daemon --start --background \
26 --exec=/sbin/resize-filesystem -- \
27 /dev/root /run/resize.rootfs /dev/console
30 cirros-per once resize-rootfs -- \
31 /sbin/resize-filesystem \
32 /dev/root /run/resize.rootfs /dev/console
36 echo "resizefs: unknown RESIZE_MODE='$RESIZE_MODE'." \
41 stop|restart|reload) : ;;
43 echo $"Usage: $0 {start}"