From ce9bebc431148899460f4fd50f33808b870587df Mon Sep 17 00:00:00 2001 From: Lourival Vieira Neto Date: Tue, 4 Apr 2023 21:29:35 +0000 Subject: [PATCH] improve sbin/ scripts --- sbin/{lunatik.lua => lunatik} | 0 sbin/lunatik.sh | 9 +++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) rename sbin/{lunatik.lua => lunatik} (100%) diff --git a/sbin/lunatik.lua b/sbin/lunatik similarity index 100% rename from sbin/lunatik.lua rename to sbin/lunatik diff --git a/sbin/lunatik.sh b/sbin/lunatik.sh index b8fd8d17..81e5f468 100755 --- a/sbin/lunatik.sh +++ b/sbin/lunatik.sh @@ -23,6 +23,7 @@ # LUNATIK_LIBS=(device linux) +LUNATIK_PATH=/lib/modules/lua load() { insmod $1.ko @@ -73,7 +74,7 @@ status() { run() { if isloaded lunatik_run; then - sbin/lunatik.lua + sbin/lunatik else echo "lunatik_run is not loaded" fi @@ -94,7 +95,11 @@ case "$1" in status ;; install) - cp lunatik.lua /lib/modules/lua/ + mkdir -p ${LUNATIK_PATH} + cp lunatik.lua ${LUNATIK_PATH} + chown -R root.root ${LUNATIK_PATH} + chmod 755 ${LUNATIK_PATH} + chmod 644 ${LUNATIK_PATH}/lunatik.lua ;; run) run