Commit b01a7fef authored by Joanne Hugé's avatar Joanne Hugé

Add profile option in ptp4l wrapper script

parent ee364cac
...@@ -2,5 +2,34 @@ ...@@ -2,5 +2,34 @@
linuxptp_dir=/home/oli/linuxptp linuxptp_dir=/home/oli/linuxptp
echo "ptp4l -i eth0 -f $linuxptp_dir/configs/gPTP.cfg --step_threshold=1 -m -S &> ~/ptp4l_log &"; telecom_profile="G.8265.1.cfg"
ptp4l -i eth0 -f $linuxptp_dir/configs/gPTP.cfg --step_threshold=1 -m -S &> ~/ptp4l_log & gPTP_profile="gPTP.cfg"
profile=$telecom_profile
usage() {
echo "Usage: $0 [-p telecom|gPTP|OTHER]" 1>&2;
exit 1;
}
while getopts "p:q:" opt; do
case "${opt}" in
p )
input_profile=${OPTARG}
if [ $input_profile == "telecom" ]; then
profile=$telecom_profile
elif [ $input_profile == "gPTP" ]; then
profile=$gPTP_profile
else
profile=$input_profile
fi
;;
* )
usage
;;
esac
done
shift $((OPTIND-1))
echo "ptp4l -i eth0 -f $linuxptp_dir/configs/$profile --step_threshold=1 -m -S &> ~/ptp4l_log &";
ptp4l -i eth0 -f $linuxptp_dir/configs/$profile --step_threshold=1 -m -S &> ~/ptp4l_log &
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment