ZhenYu 99ca4e048d
docker: upgrade to more powerful dockerman (#3053)
* luci-lib-docker: add package:

* version:

e5da5cda84686ed55093c2508dcda250fe547f6d

* luci-app-dockerman: add package & minimal mod:

* version:

870f50b4d1e4c015b790e6a81cb92b5b67b822c1

* luci-app-docker: rm package
2020-02-12 20:17:53 +08:00

26 lines
383 B
Bash
Executable File

#!/bin/sh
dtype=`fdisk -l /dev/sda | grep 'Disklabel type' | awk '{print $3}'`
partid="0"
if [ "$dtype" = "gpt" ]
then
partid=`echo "n
w
" | fdisk /dev/sda | grep 'Created a new partition' | awk '{print $5}'`
elif [ "$dtype" = "dos" ]
then
partid=`echo "n
p
w
" | fdisk /dev/sda | grep 'Created a new partition' | awk '{print $5}'`
fi
echo "y" | mkfs.ext4 /dev/sda$partid