 
post_install() {
  if [ -f /boot/extlinux/extlinux.conf.pacsave ]; then
  mv /boot/extlinux/extlinux.conf.pacsave /boot/extlinux/extlinux.conf
  fi
  if [ -f /boot/extlinux/extlinux.conf ]; then
  echo "Keeping old extlinux.conf file..."
  else
  mkdir -p /boot/extlinux/
  echo "LABEL Manjaro
LINUX /Image
INITRD /initramfs-linux.img
FDT /dtbs/amlogic/meson-g12b-a311d-khadas-vim3.dtb
APPEND root=LABEL=ROOT_MNJRO rootflags=data=writeback rw console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 bootsplash.bootfile=bootsplash-themes/manjaro/bootsplash" > /boot/extlinux/extlinux.conf
  fi
}

post_upgrade() {
   if [ -f /boot/extlinux/extlinux.conf.pacsave ]; then
  mv /boot/extlinux/extlinux.conf.pacsave /boot/extlinux/extlinux.conf
  fi
  if [ -f /boot/extlinux/extlinux.conf ]; then
  echo "Keeping old extlinux.conf file..."
  else
  mkdir -p /boot/extlinux/
  echo "LABEL Manjaro
LINUX /Image
INITRD /initramfs-linux.img
FDT /dtbs/amlogic/meson-g12b-a311d-khadas-vim3.dtb
APPEND root=LABEL=ROOT_MNJRO rootflags=data=writeback rw console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 bootsplash.bootfile=bootsplash-themes/manjaro/bootsplash" > /boot/extlinux/extlinux.conf
  fi
}
