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%%.*}
|
VERSION_ID=${VERSION_ID%%.*}
|
||||||
OS_VER=$OS-$VERSION_ID
|
OS_VER=$OS-$VERSION_ID
|
||||||
DHCPCD_PATH=`which dhcpcd`
|
DHCPCD_PATH=`which dhcpcd`
|
||||||
|
NM_PATH=`which NetworkManager`
|
||||||
|
|
||||||
case $OS_VER in
|
case $OS_VER in
|
||||||
"fedora-18" | \
|
"fedora-18" | \
|
||||||
|
@ -59,10 +60,20 @@ if [ ! x$DHCPCD_PATH = x ]
|
||||||
then
|
then
|
||||||
DHCPCD=`systemctl is-enabled dhcpcd`
|
DHCPCD=`systemctl is-enabled dhcpcd`
|
||||||
fi
|
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
|
cat <<EOF
|
||||||
{"phplib_dir" : "$PHPLIB_DIR",
|
{"phplib_dir" : "$PHPLIB_DIR",
|
||||||
"stage" : "$STAGE",
|
"stage" : "$STAGE",
|
||||||
"dhcpcd" : "$DHCPCD",
|
"dhcpcd" : "$DHCPCD",
|
||||||
|
"network_manager" : "$NM",
|
||||||
|
"systemd_networkd" : "$SYSD_NETD",
|
||||||
"iiab_branch" : "$BRANCH",
|
"iiab_branch" : "$BRANCH",
|
||||||
"iiab_commit" : "$COMMIT",
|
"iiab_commit" : "$COMMIT",
|
||||||
"xo_model" : "$XO_VERSION",
|
"xo_model" : "$XO_VERSION",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue