Browse Source

create Mender mount-points in one single location

There where multiple places where mount-points where created, and
in some cases it was even duplicate code.

Instead create it during convert-stage-4 where we do all generic Mender
installation, and do it unconditionally.

Changelog: None

Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
1.1.x
Mirza Krak 6 years ago
parent
commit
e8694c1173
  1. 4
      bbb-convert-stage-3.sh
  2. 26
      convert-stage-4.sh
  3. 8
      mender-convert

4
bbb-convert-stage-3.sh

@ -11,10 +11,6 @@ embedded_rootfs_dir=$2
# Copy rootfs partition.
sudo cp -ar ${embedded_rootfs_dir}/* ${sdimg_primary_dir}
# Add mountpoints.
sudo install -d -m 755 ${sdimg_primary_dir}/boot/efi
sudo install -d -m 755 ${sdimg_primary_dir}/data
log "\tDone."
exit 0

26
convert-stage-4.sh

@ -171,26 +171,18 @@ install_files() {
sudo ln -sf /data/${databootdir}/fw_env.config ${primary_dir}/etc/fw_env.config
# Prepare 'primary' partition
[ ! -d "$primary_dir/data" ] && \
{ log "\t'data' mountpoint missing. Adding"; \
sudo install -d -m 755 ${primary_dir}/data; }
# Create mount-points
#
# Note that only one of /boot/efi or /uboot will be used depending on what
# type of Mender integration is used (GRUB or U-boot). I do not see any
# problems with keeping an empty directory to reduce complexity of creating
# this directory structure.
sudo install -d -m 755 ${primary_dir}/data
sudo install -d -m 755 ${primary_dir}/boot/efi
sudo install -d -m 755 ${primary_dir}/uboot
case "$device_type" in
"beaglebone")
[ ! -d "$primary_dir/boot/efi" ] && \
{ log "\t'/boot/efi' mountpoint missing. Adding"; \
sudo install -d -m 755 ${primary_dir}/boot/efi; }
;;
"raspberrypi3"|"raspberrypi0w")
[ ! -d "$primary_dir/uboot" ] && \
{ log "\t'/uboot' mountpoint missing. Adding"; \
sudo install -d -m 755 ${primary_dir}/uboot; }
;;
"qemux86_64")
[ ! -d "$primary_dir/boot/efi" ] && \
{ log "\t'/boot/efi' mountpoint missing. Adding"; \
sudo install -d -m 755 ${primary_dir}/boot/efi; }
sudo install -d ${primary_dir}/lib64
sudo ln -sf /lib/ld-linux-x86-64.so.2 ${primary_dir}/lib64/ld-linux-x86-64.so.2
;;

8
mender-convert

@ -401,10 +401,6 @@ do_make_sdimg_raspberrypi3() {
mount_mender_disk ${mender_disk_mappings[@]}
# Add mountpoints.
sudo install -d -m 755 ${sdimg_primary_dir}/uboot
sudo install -d -m 755 ${sdimg_primary_dir}/data
log "$step/$total Setting file system table..."
((step++))
set_fstab $device_type
@ -448,10 +444,6 @@ do_make_sdimg_qemux86_64() {
mount_mender_disk ${mender_disk_mappings[@]}
# Add mountpoints.
sudo install -d -m 755 ${sdimg_primary_dir}/boot/efi
sudo install -d -m 755 ${sdimg_primary_dir}/data
log "$step/$total Setting file system table..."
((step++))
set_fstab $device_type

Loading…
Cancel
Save