mirror of
https://github.com/lxsang/meta-rpi-diya.git
synced 2024-11-08 06:28:23 +01:00
use sysvinit
This commit is contained in:
parent
8ba74de514
commit
e552576431
@ -6,7 +6,8 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda
|
||||
SRC_URI += "file://confd \
|
||||
file://expandfs.sh \
|
||||
file://80_diya \
|
||||
file://fs_resize"
|
||||
file://fs_resize \
|
||||
file://boot-to-recovery"
|
||||
|
||||
|
||||
inherit update-rc.d useradd
|
||||
@ -26,7 +27,8 @@ do_install() {
|
||||
install -d ${D}/usr/bin/
|
||||
install -d ${D}/etc/default/volatiles
|
||||
# install -m 0644 ${WORKDIR}/80_diya ${D}${sysconfdir}/default/volatiles
|
||||
install -m 0755 ${WORKDIR}/expandfs.sh ${D}/usr/bin/expandfs.sh
|
||||
install -m 0755 ${WORKDIR}/expandfs.sh ${D}/usr/sbin/expandfs.sh
|
||||
install -m 0755 ${WORKDIR}/boot-to-recovery ${D}/usr/sbin/boot-to-recovery
|
||||
install -m 0755 ${WORKDIR}/fs_resize ${DEPLOY_DIR_IMAGE}/
|
||||
|
||||
cat << EOF >> ${DEPLOY_DIR_IMAGE}/extraconfig.txt
|
||||
|
@ -9,7 +9,7 @@ fi
|
||||
|
||||
# prepare env for recovery boot
|
||||
cat << EOF > /boot/extraconfig.txt
|
||||
initramfs recovery-${MACHINE}.cpio.gz followkernel
|
||||
initramfs recovery-$MACHINE.cpio.gz followkernel
|
||||
EOF
|
||||
echo "Rebooting to recovery mode"
|
||||
reboot
|
@ -13,7 +13,7 @@ case "$1" in
|
||||
# need to turn it on manually
|
||||
echo 0 > /sys/class/backlight/backlight/bl_power
|
||||
if [ -f "/boot/fs_resize" ]; then
|
||||
/usr/bin/expandfs.sh
|
||||
/usr/sbin/expandfs.sh
|
||||
touch /boot/home_partition_should_be_formated
|
||||
rm /boot/fs_resize
|
||||
reboot
|
||||
|
@ -1,4 +1,10 @@
|
||||
#! /bin/sh
|
||||
|
||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||
echo "$0 shall be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
line=$(
|
||||
sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | fdisk /dev/mmcblk0 | grep /dev/mmcblk0p4
|
||||
p
|
||||
|
Loading…
Reference in New Issue
Block a user