mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
NM and sysd_netd detection
This commit is contained in:
parent
095bf1acdc
commit
8197ead1b7
1 changed files with 11 additions and 0 deletions
|
@ -6,6 +6,7 @@ VERSION_ID=${VERSION_ID//\"/}
|
|||
VERSION_ID=${VERSION_ID%%.*}
|
||||
OS_VER=$OS-$VERSION_ID
|
||||
DHCPCD_PATH=`which dhcpcd`
|
||||
NM_PATH=`which NetworkManager`
|
||||
|
||||
case $OS_VER in
|
||||
"fedora-18" | \
|
||||
|
@ -59,10 +60,20 @@ if [ ! x$DHCPCD_PATH = x ]
|
|||
then
|
||||
DHCPCD=`systemctl is-enabled dhcpcd`
|
||||
fi
|
||||
# the check is debian family only is_redhad would use NetworkManager as the
|
||||
# service name.
|
||||
if [ ! x$NM_PATH = x ]
|
||||
then
|
||||
NM=`systemctl is-enabled network-manager`
|
||||
fi
|
||||
SYSD_NETD=`systemctl is-enabled systemd-networkd`
|
||||
|
||||
cat <<EOF
|
||||
{"phplib_dir" : "$PHPLIB_DIR",
|
||||
"stage" : "$STAGE",
|
||||
"dhcpcd" : "$DHCPCD",
|
||||
"network_manager" : "$NM",
|
||||
"systemd_networkd" : "$SYSD_NETD",
|
||||
"iiab_branch" : "$BRANCH",
|
||||
"iiab_commit" : "$COMMIT",
|
||||
"xo_model" : "$XO_VERSION",
|
||||
|
|
Loading…
Add table
Reference in a new issue