refactor + use gtk4-layer-shell 1.1.0
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user