1
0
mirror of https://github.com/lxsang/meta-rpi-diya.git synced 2024-11-08 22:48:22 +01:00
meta-rpi-diya/recipes-diya/initramfs/files/confd

29 lines
647 B
Plaintext
Raw Normal View History

2023-08-01 23:15:55 +02:00
#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
2023-08-02 00:05:19 +02:00
DESC="Custom configuration"
2023-08-02 09:51:11 +02:00
. /etc/profile
2023-08-01 23:15:55 +02:00
case "$1" in
start)
echo -n "Start $DESC: "
# for some reason the LCD backlight is turned off
# need to turn it on manually
echo 0 > /sys/class/backlight/backlight/bl_power
2023-08-02 00:13:06 +02:00
# hostname
echo "diya-recovery" > /proc/sys/kernel/hostname
2023-08-02 00:51:40 +02:00
# mount boot
2023-08-02 01:04:31 +02:00
mount /dev/mmcblk0p1 /boot
2023-08-02 09:51:11 +02:00
cat << EOF >> /boot/extraconfig.txt
# initramfs recovery-${MACHINE}.cpio.gz followkernel
EOF
2023-08-01 23:15:55 +02:00
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start}" >&2
exit 1
;;
esac
exit 0