File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,19 +69,19 @@ function prepare_root_device__create_volume_group() {
6969
7070function label_partition() {
7171 if [ " $ROOTFS_TYPE " == " ext4" ]; then
72- e2label " /dev/mapper/${LVM_VG_NAME} -root" armbi_root
72+ e2label " /dev/mapper/${LVM_VG_NAME} -root" " ${ROOT_FS_LABEL} "
7373 elif [ " $ROOTFS_TYPE " == " btrfs" ]; then
74- btrfs filesystem label " $( mount | grep " /dev/mapper/${LVM_VG_NAME} -root" | awk ' {print $3}' ) " armbi_root
75- elif [ " $ROOTFS_TYPE " == " nilfs " ]; then
76- nilfs-tune -L armbi_root " /dev/mapper/${LVM_VG_NAME} -root"
74+ btrfs filesystem label " $( mount | grep " /dev/mapper/${LVM_VG_NAME} -root" | awk ' {print $3}' ) " " ${ROOT_FS_LABEL} "
75+ elif [ " $ROOTFS_TYPE " == " nilfs2 " ]; then
76+ nilfs-tune -L " ${ROOT_FS_LABEL} " " /dev/mapper/${LVM_VG_NAME} -root"
7777 elif [ " $ROOTFS_TYPE " == " xfs" ]; then
78- xfs_io -c " label -s armbi_root " " $( mount | grep " /dev/mapper/${LVM_VG_NAME} -root" | awk ' {print $3}' ) "
78+ xfs_io -c " label -s \" ${ROOT_FS_LABEL} \" " " $( mount | grep " /dev/mapper/${LVM_VG_NAME} -root" | awk ' {print $3}' ) "
7979 fi
8080}
8181
8282function format_partitions__format_lvm() {
83- # Skip unknown/unsupported filesystems. nfs does not support labels and f2fs labels cannot be changed online
84- if echo " ext4 btrfs nilfs xfs" | grep -v -w -q " $ROOTFS_TYPE " ; then
83+ # Skip unknown filesystems
84+ if echo " ext4 btrfs nilfs2 xfs" | grep -v -w -q " $ROOTFS_TYPE " ; then
8585 display_alert " LVM partition labels skipped" " ${EXTENSION} " " info"
8686 return
8787 fi
You can’t perform that action at this time.
0 commit comments