From 9d5ddcdfe986a3a36c709b737bbd664db673a33b Mon Sep 17 00:00:00 2001 From: cronyx Date: Fri, 31 Mar 2023 15:32:20 +0300 Subject: [PATCH] move cli from profile to external script (#701) --- general/overlay/etc/profile | 2 -- general/overlay/usr/sbin/cli | 1 + general/overlay/usr/sbin/extutils | 11 +++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) create mode 120000 general/overlay/usr/sbin/cli create mode 100755 general/overlay/usr/sbin/extutils diff --git a/general/overlay/etc/profile b/general/overlay/etc/profile index d7bb0885..ef5bba22 100644 --- a/general/overlay/etc/profile +++ b/general/overlay/etc/profile @@ -30,8 +30,6 @@ export EDITOR='/bin/vi' [ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; } -cli() { yaml-cli -i /etc/majestic.yaml $@; } - differ() { diff -rN "/rom$1" "$1"; } [ -x /tmp/ipctool ] || ipctool() { [ -x /tmp/ipctool ] && /tmp/ipctool $@ || (curl -s -L -o /tmp/ipctool https://github.com/OpenIPC/ipctool/releases/download/latest/ipctool$ARC && \ diff --git a/general/overlay/usr/sbin/cli b/general/overlay/usr/sbin/cli new file mode 120000 index 00000000..756c71c5 --- /dev/null +++ b/general/overlay/usr/sbin/cli @@ -0,0 +1 @@ +extutils \ No newline at end of file diff --git a/general/overlay/usr/sbin/extutils b/general/overlay/usr/sbin/extutils new file mode 100755 index 00000000..a7dcd5b1 --- /dev/null +++ b/general/overlay/usr/sbin/extutils @@ -0,0 +1,11 @@ +#!/bin/sh + +cmd=`echo $0 | cut -d / -f 4` + +case "${cmd}" in + cli) + yaml-cli -i /etc/majestic.yaml $@; + ;; + *) + ;; +esac