mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-31 19:21:43 +00:00
Force reboot if online resize was not successful regarding of the distribution
This commit is contained in:
parent
1b81c4f205
commit
5649a086b6
1 changed files with 2 additions and 2 deletions
|
@ -94,9 +94,9 @@ do_expand_rootfs(){
|
|||
((echo d; echo $PARTITIONS; echo n; echo p; echo ; echo $STARTFROM; echo ; echo w;) | fdisk $device) >/dev/null || true
|
||||
s=0
|
||||
fsck -f $root_partition >/dev/null 2>&1 || true
|
||||
partprobe $device >/dev/null 2>&1 || true
|
||||
partprobe $device >/dev/null 2>&1 || s=$?
|
||||
resize2fs $root_partition >/dev/null 2>&1 || true
|
||||
if [ "$DISTRIBUTION" == "wheezy" ]; then
|
||||
if [[ "$DISTRIBUTION" == "wheezy" || "$s" != "0" ]]; then
|
||||
touch /var/run/reboot
|
||||
display_alert "Automatic reboot is needed. Please wait"
|
||||
update-rc.d resize2fs defaults >/dev/null 2>&1
|
||||
|
|
Loading…
Add table
Reference in a new issue