
29 Oct
2020
29 Oct
'20
5:16 p.m.
On Thu, Oct 29, 2020 at 04:47:11PM +0800, Hu Xuejiao wrote:
mount $rootfs_partition $ROOTFS_DIR || { - mkfs.btrfs -f $rootfs_partition
if btrfs else ext4, why mount 2 times ? if you think this root_partition has been mkfs to btrfs, how to consider the date inside it? suggest mkfs first, then mount. Thanks, dewan
+ if command -v mkfs.btrfs > /dev/null; then + mkfs.btrfs -f $rootfs_partition + else + mkfs.ext4 -F $rootfs_partition || return + fi + mount $rootfs_partition $ROOTFS_DIR } mkdir -p $ROOTFS_DIR/tmp -- 2.23.0