On Thu, Oct 22, 2020 at 06:40:08PM +0800, Hu Xuejiao wrote:
When job.yaml contains "fs: **", and /srv/initrd/deps/**/**/fs.cgz(btrfs-progs), it will execute mkfs.btrfs -f $rootfs_partition. but job.yaml don't container
^----word 'But' ^----word 'contain'
"fs: **" to appear warning:
mkfs.btrfs command not found
Signed-off-by: Hu XueJiao huxuejiao1@huawei.com
lib/bootstrap.sh | 1 + 1 file changed, 1 insertion(+)
diff --git a/lib/bootstrap.sh b/lib/bootstrap.sh index a7776d68..16789c5c 100755 --- a/lib/bootstrap.sh +++ b/lib/bootstrap.sh @@ -456,6 +456,7 @@ mount_rootfs() ROOTFS_DIR=/opt/rootfs mkdir -p $ROOTFS_DIR mount $rootfs_partition $ROOTFS_DIR || {
command -v mkfs.btrfs >/dev/null || return
^----append space.
mkfs.btrfs -f $rootfs_partition mount $rootfs_partition $ROOTFS_DIR
whether can change like this:
command -v mkfs.btrfs > /dev/null && { mkfs.btrfs -f $rootfs_partition mount $rootfs_partition $ROOTFS_DIR }
Thanks, Liushaofei
}
-- 2.23.0