You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

26 lines
560 B

  1. #!/bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides: resize2fs_once
  4. # Required-Start:
  5. # Required-Stop:
  6. # Default-Start: 3
  7. # Default-Stop:
  8. # Short-Description: Resize the root filesystem to fill partition
  9. # Description:
  10. ### END INIT INFO
  11. . /lib/lsb/init-functions
  12. case "$1" in
  13. start)
  14. log_daemon_msg "Starting resize2fs_once"
  15. ROOT_DEV=$(findmnt / -o source -n) &&
  16. resize2fs $ROOT_DEV &&
  17. update-rc.d resize2fs_once remove &&
  18. rm /etc/init.d/resize2fs_once &&
  19. log_end_msg $?
  20. ;;
  21. *)
  22. echo "Usage: $0 start" >&2
  23. exit 3
  24. ;;
  25. esac