Skip to content

Commit

Permalink
init: create /mnt/sdcard if not present
Browse files Browse the repository at this point in the history
PR #38 was merged a bit too early, as there's a case when this directory
does not exist at mount time. In addition, move mounting before printing
the banner just because it outputs some messages to syslog.

Closes #38
  • Loading branch information
ruslashev committed May 17, 2023
1 parent da79d19 commit 4a6e2ec
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tp2bmc/board/tp2bmc/overlay/etc/init.d/S99hello.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
#! /bin/sh

mkdir -p /mnt/sdcard

if [ -b /dev/mmcblk0p1 ]; then
mount /dev/mmcblk0p1 /mnt/sdcard
elif [ -b /dev/mmcblk0 ]; then
mount /dev/mmcblk0 /mnt/sdcard
fi

echo " _____ _ _ ____ ___ _ _ ____ "
echo "|_ _| | | | _ \|_ _| \ | |/ ___|"
echo " | | | | | | |_) || || \| | | _ "
echo " | | | |_| | _ < | || |\ | |_| |"
echo " |_| \___/|_| \_\___|_| \_|\____|"

if [ -f /dev/mmcblk0p1 ]; then
mount /dev/mmcblk0p1 /mnt/sdcard/
elif [ -f /dev/mmcblk0 ]; then
mount /dev/mmcblk0 /mnt/sdcard/
fi

echo 3 4 1 7 > /proc/sys/kernel/printk

sleep 1
Expand Down

0 comments on commit 4a6e2ec

Please sign in to comment.