From 3320564bd249255a3fcbbeb1d06b15baad167474 Mon Sep 17 00:00:00 2001 From: Viktor Petersson Date: Tue, 26 Mar 2013 22:58:32 +0100 Subject: [PATCH] Adds ability to run root-fs expansion non-interactively by passing the argument --expand-rootfs. This is very useful if you need to implement an automatic disk space expansion. --- .gitignore | 1 + raspi-config | 24 ++++++++++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1377554 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.swp diff --git a/raspi-config b/raspi-config index 1175c4f..8b3aaa1 100755 --- a/raspi-config +++ b/raspi-config @@ -3,13 +3,14 @@ # # See LICENSE file for copyright and license details +INTERACTIVE=True ASK_TO_REBOOT=0 do_info() { whiptail --msgbox "\ -This tool provides a straight-forward way of doing initial -configuration of the Raspberry Pi. Although it can be run -at any time, some of the options may have difficulties if +This tool provides a straight-forward way of doing initial +configuration of the Raspberry Pi. Although it can be run +at any time, some of the options may have difficulties if you have heavily customised your installation.\ " 20 70 1 } @@ -18,7 +19,7 @@ do_expand_rootfs() { # Get the starting offset of the root partition PART_START=$(parted /dev/mmcblk0 -ms unit s p | grep "^2" | cut -f 2 -d:) [ "$PART_START" ] || return 1 - # Return value will likely be error for fdisk as it fails to reload the + # Return value will likely be error for fdisk as it fails to reload the # partition table because the root fs is mounted fdisk /dev/mmcblk0 <