mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
various minor fixes (#1993)
* fix permisson denied error happening in line 79
`mktemp` creates files with `-rw-------` (on Ubuntu bionic at least), which causes `line 79` to throw a permission denied error if the file isn't world readable.
* fixes umount error caused by single quotes
* force metadata duplication for btrfs root
Without this change metadata duplication is automatically turned off for `mkfs.btrfs` when the **build system** has a SSD drive.
However, since Armbian image is most likely flashed to a SD card afterwards, the drive type of the build host system should not be the deciding factor.
Metadata duplication is a good idea (better reliability) to have on a SD card.
From `man mkfs.btrfs`:
```
-m|--metadata <profile>
Specify the profile for the metadata block groups. Valid values are raid0, raid1, raid5, raid6, raid10, single or dup, (case does not matter).
A single device filesystem will default to DUP, unless a SSD is detected. Then it will default to single.
```
This commit is contained in:
@@ -66,7 +66,7 @@ update_src() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
TMPFILE=`mktemp`
|
TMPFILE=`mktemp` && chmod 644 $TMPFILE
|
||||||
echo SRC=$SRC > $TMPFILE
|
echo SRC=$SRC > $TMPFILE
|
||||||
echo LIB_TAG=$LIB_TAG >> $TMPFILE
|
echo LIB_TAG=$LIB_TAG >> $TMPFILE
|
||||||
declare -f update_src >> $TMPFILE
|
declare -f update_src >> $TMPFILE
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ debootstrap_ng()
|
|||||||
# stage: unmount tmpfs
|
# stage: unmount tmpfs
|
||||||
umount $SDCARD 2>&1
|
umount $SDCARD 2>&1
|
||||||
if [[ $use_tmpfs = yes ]]; then
|
if [[ $use_tmpfs = yes ]]; then
|
||||||
while grep -qs '$SDCARD' /proc/mounts
|
while grep -qs "$SDCARD" /proc/mounts
|
||||||
do
|
do
|
||||||
umount $SDCARD
|
umount $SDCARD
|
||||||
sleep 5
|
sleep 5
|
||||||
@@ -324,7 +324,7 @@ prepare_partitions()
|
|||||||
mkopts[fat]='-n BOOT'
|
mkopts[fat]='-n BOOT'
|
||||||
mkopts[ext2]='-q'
|
mkopts[ext2]='-q'
|
||||||
# mkopts[f2fs] is empty
|
# mkopts[f2fs] is empty
|
||||||
# mkopts[btrfs] is empty
|
mkopts[btrfs]='-m dup'
|
||||||
# mkopts[nfs] is empty
|
# mkopts[nfs] is empty
|
||||||
|
|
||||||
mkfs[ext4]=ext4
|
mkfs[ext4]=ext4
|
||||||
|
|||||||
Reference in New Issue
Block a user