create_config() {
  mkdir -p /boot/extlinux
  echo "LABEL Manjaro ARM
LINUX /Image
FDT /dtbs/rockchip/rk3588-orangepi-5-plus.dtb
APPEND initrd=/initramfs-linux.img console=ttyS2,1500000 root=LABEL=ROOT_MNJRO rw rootwait audit=0 splash plymouth.ignore-serial-consoles" \
    > /boot/extlinux/extlinux.conf
}

post_install() {
  create_config
}

post_upgrade() {
    # Provide the instructions
   
    if [ -f /boot/extlinux/extlinux.conf.pacsave ]; then
        echo "Picking up /boot/extlinux/extlinux.conf.pacsave..."
        mv -f /boot/extlinux/extlinux.conf.pacsave /boot/extlinux/extlinux.conf
    fi

   if [ -f /boot/extlinux/extlinux.conf ]; then
     echo "Nothing to do"
    else
        create_config
    fi
}


