post_install() {
   echo "Please Re-Install the Linux Kernel again"

  if [ -f /boot/uEnv.ini.pacsave ]; then
  mv /boot/uEnv.ini.pacsave /boot/uEnv.ini
  fi
  if [ -f /boot/uEnv.ini ]; then
  echo "Keeping old uEnv.ini file..."
  else
  echo "dtb_name=/dtbs/amlogic/meson-sm1-bananapi-m5.dtb
bootargs=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 quiet splash plymouth.ignore-serial-consoles" > /boot/uEnv.ini
  fi
}

post_upgrade() {
  echo "Please Re-Install the Linux Kernel again"
  if [ -f /boot/uEnv.ini.pacsave ]; then
  mv /boot/uEnv.ini.pacsave /boot/uEnv.ini
  fi
  if [ -f /boot/uEnv.ini ]; then
  echo "Keeping old uEnv.ini file..."
  else

  echo "dtb_name=/dtbs/amlogic/meson-sm1-bananapi-m5.dtb
bootargs=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 quiet splash plymouth.ignore-serial-consoles"
  fi
}

post_remove() {
  rm -f boot/uInitrd
  rm -f boot/uImage
  rm -f boot/uEnv.ini
}
