From 400671cf2b602565ff7100f1e52b38fb50850385 Mon Sep 17 00:00:00 2001 From: bol-van Date: Tue, 23 Jan 2024 17:08:50 +0300 Subject: [PATCH] install_prereq.sh : accept unknown rc system --- common/installer.sh | 4 +++- install_prereq.sh | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/installer.sh b/common/installer.sh index 6a4a7f6..893109e 100644 --- a/common/installer.sh +++ b/common/installer.sh @@ -72,6 +72,8 @@ openrc_test() } check_system() { + # $1 - nonempty = do not fail on unknown rc system + echo \* checking system SYSTEM="" @@ -111,7 +113,7 @@ check_system() echo system is not either systemd, openrc or openwrt based echo easy installer can set up config settings but can\'t configure auto start echo you have to do it manually. check readme.txt for manual setup info. - if ask_yes_no N "do you want to continue"; then + if [ -n "$1" ] || ask_yes_no N "do you want to continue"; then SYSTEM=linux else exitp 5 diff --git a/install_prereq.sh b/install_prereq.sh index 58e1d83..01415b6 100755 --- a/install_prereq.sh +++ b/install_prereq.sh @@ -22,7 +22,7 @@ ZAPRET_BASE="$EXEDIR" umask 0022 fsleep_setup fix_sbin_path -check_system +check_system accept_unknown_rc [ $UNAME = "Linux" ] || { echo no prerequisites required for $SYSTEM }