To make a symlink between /proc/device-tree/aliases/serial1 ->/dev/ttyAMA0.For that i have tried one script in /etc/hotplug.d/uart/99-com,which is as follows.
#! /bin/sh
SYMLINK="ttyAMA0"
if[ "${ACTION}" = "add" ]; then
logger -t To create Hotplug Symlink
DEVICE_NAME=$(cat /proc/device-tree/aliases/serial1)
ln -s /dev/$DEVICE_NAME /dev/${SYMLINK}
logger -t Symlink from /dev/$DEVICE_NAME to /dev/${SYMLINK} created.
fi
Can anyone please tell me what is the mistake I am doing here because of that symlink is not happening.