refactor + use gtk4-layer-shell 1.1.0

This commit is contained in:
DanyLE
2025-03-05 14:27:12 +01:00
parent bdfbfc9669
commit daa23c88e6
16 changed files with 138 additions and 96 deletions

View File

@ -31,7 +31,7 @@ do_install() {
install -m 0755 ${WORKDIR}/boot-to-recovery ${D}/sbin/boot-to-recovery
install -m 0755 ${WORKDIR}/fs_resize ${DEPLOY_DIR_IMAGE}/
cat << EOF >> ${DEPLOY_DIR_IMAGE}/config.txt
cat << EOF > ${DEPLOY_DIR_IMAGE}/config.txt
recovery=false
recovery_image=recovery-${MACHINE}.cpio.gz
console=both

View File

@ -3,6 +3,10 @@
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DESC="Auto deployment configuration from media"
if [ -z "$DISK" ]; then
DISK="mmcblk1"
fi
case "$1" in
start)
echo -n "Start $DESC: "
@ -19,9 +23,9 @@ case "$1" in
fi
if [ -f "/boot/home_partition_should_be_formated" ]; then
echo "Trying to format the home partition"
umount /dev/mmcblk1p4
yes | mkfs.ext4 /dev/mmcblk1p4
mount /dev/mmcblk1p4 /home
umount /dev/${DISK}p4
yes | mkfs.ext4 /dev/${DISK}p4
mount /dev/${DISK}p4 /home
mkdir -p /home/diya
chown -R diya:diya /home/diya
rm /boot/home_partition_should_be_formated

View File

@ -1,20 +1,15 @@
#! /bin/sh
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
if [ -z "$DISK" ]; then
DISK="mmcblk1"
fi
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/mmcblk1 | grep /dev/mmcblk1p4
p
q
EOF
)
echo "Partition: $line"
#start_sector=$(echo "$line" | cut -d' ' -f14)
start_sector=$(echo "$line" | cut -d' ' -f15)
start_sector=$(cat /sys/block/$DISK/${DISK}p4/start)
echo "Start sector is: $start_sector"
if [ -z "$start_sector" ]; then
@ -23,7 +18,7 @@ if [ -z "$start_sector" ]; then
fi
echo "Expanding the partition"
sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | fdisk /dev/mmcblk1p4
sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | fdisk /dev/$DISK
d # delete partition
4 # number 4
n # new partition