mirror of
https://github.com/brain-hackers/brain-config.git
synced 2025-01-01 00:50:06 +09:00
Merge pull request #14 from vpetersson/master
Adds ability to non-interactively run disk expansion with --expand-rootfs.
This commit is contained in:
commit
ca224d0f6b
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
*.swp
|
12
raspi-config
12
raspi-config
@ -3,6 +3,7 @@
|
|||||||
#
|
#
|
||||||
# See LICENSE file for copyright and license details
|
# See LICENSE file for copyright and license details
|
||||||
|
|
||||||
|
INTERACTIVE=True
|
||||||
ASK_TO_REBOOT=0
|
ASK_TO_REBOOT=0
|
||||||
|
|
||||||
do_info() {
|
do_info() {
|
||||||
@ -65,8 +66,9 @@ esac
|
|||||||
EOF
|
EOF
|
||||||
chmod +x /etc/init.d/resize2fs_once &&
|
chmod +x /etc/init.d/resize2fs_once &&
|
||||||
update-rc.d resize2fs_once defaults &&
|
update-rc.d resize2fs_once defaults &&
|
||||||
whiptail --msgbox "Root partition has been resized.\n\
|
if [ "$INTERACTIVE" = True ]; then
|
||||||
The filesystem will be enlarged upon the next reboot" 20 60 2
|
whiptail --msgbox "Root partition has been resized.\nThe filesystem will be enlarged upon the next reboot" 20 60 2
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
set_config_var() {
|
set_config_var() {
|
||||||
@ -402,6 +404,12 @@ do
|
|||||||
printf "Not currently supported\n"
|
printf "Not currently supported\n"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
--expand-rootfs)
|
||||||
|
INTERACTIVE=False
|
||||||
|
do_expand_rootfs
|
||||||
|
printf "Please reboot\n"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
# unknown option
|
# unknown option
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user