sonic-buildimage/platform/broadcom/sonic-platform-modules-cel/haliburton/script/udev_prefix.sh
sandycelestica 4c8b1c4896
[udev] Add customize udev rule for console switch(for e1031) (#5571)
* Add files via upload
* Update platform-modules-haliburton.install
* Update 50-ttyUSB-C0.rules
* Update popmsg.sh
* Update udev_prefix.sh
2020-10-15 10:25:32 +08:00

24 lines
485 B
Bash

#!/bin/bash
PREV_REBOOT_CAUSE="/host/reboot-cause/"
DEVICE="/usr/share/sonic/device"
PLATFORM=$(/usr/local/bin/sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)
FILES=$DEVICE/$PLATFORM/plugins
FILENAME="udevprefix.conf"
if [ "$1" = "clear" ]
then
if [ -e $FILES/$FILENAME ]; then
rm $FILES/$FILENAME
fi
else
if [ -e $FILES/$FILENAME ]; then
: > $FILES/$FILENAME
echo -n "$1" > $FILES/$FILENAME
else
touch $FILES/$FILENMAE
echo -n "$1" > $FILES/$FILENAME
fi
fi