To reduce the load on the Linuxmuster server and offload individual services, it would be great if Linbo could run on a separate server. Currently, this isn't possible due to tools that are only available on the Samba AD server. After an initial review, I noticed the following issues in the linuxmuster-common package:
Global $LDBSEARCH-definition:
|
LDBSEARCH="$(which ldbsearch) -b OU=SCHOOLS,$basedn -H /var/lib/samba/private/sam.ldb" |
get_hostname():
|
$LDBSEARCH "(sophomorixComputerIP=$1)" $attr | grep ^$attr | awk '{print $2}' |
|
$LDBSEARCH "(sophomorixComputerMAC=$(toupper $1))" $attr | grep ^$attr | awk '{print $2}' |
|
$LDBSEARCH "($attr=$(tolower $1))" $attr | grep ^$attr | awk '{print $2}' |
get_mac():
|
$LDBSEARCH "(sophomorixComputerIP=$1)" $attr | grep ^$attr | awk '{print $2}' |
|
$LDBSEARCH "(sophomorixDnsNodename=$(tolower $1))" $attr | grep ^$attr | awk '{print $2}' |
|
$LDBSEARCH "($attr=$(toupper $1))" $attr | grep ^$attr | awk '{print $2}' |
get_ip():
|
$LDBSEARCH "(sophomorixDnsNodename=$(tolower $1))" $attr | grep ^$attr | awk '{print $2}' |
|
$LDBSEARCH "(sophomorixComputerMAC=$(toupper $1))" $attr | grep ^$attr | awk '{print $2}' |
|
$LDBSEARCH "($attr=$1)" $attr | grep ^$attr | awk '{print $2}' |
get_hostgroup():
|
schoolprefix=$($LDBSEARCH "(sophomorixDnsNodename="$(tolower $1)")" sophomorixSchoolPrefix | grep sophomorixSchoolPrefix | awk '{print $2}') |
|
$LDBSEARCH "(sophomorixDnsNodename="$(tolower $1)")" memberOf | grep ,OU=device-groups, | awk -F= '{print $2}' | awk -F, '{print $1}' | sed 's|^d_||' |
|
$LDBSEARCH "(sophomorixDnsNodename="$(tolower $1)")" memberOf | grep ,OU=device-groups, | awk -F= '{print $2}' | awk -F, '{print $1}' | sed "s|^d_${schoolprefix}-||" |
get_hostname_dhcp_ip():
As discussed, it would be ideal to replace these tools with API calls to the Linuxmuster server.
Best regards, Lukas
To reduce the load on the Linuxmuster server and offload individual services, it would be great if Linbo could run on a separate server. Currently, this isn't possible due to tools that are only available on the Samba AD server. After an initial review, I noticed the following issues in the linuxmuster-common package:
Global $LDBSEARCH-definition:
linuxmuster-common/share/helperfunctions.sh
Line 17 in 78bc337
get_hostname():
linuxmuster-common/share/helperfunctions.sh
Line 77 in 78bc337
linuxmuster-common/share/helperfunctions.sh
Line 79 in 78bc337
linuxmuster-common/share/helperfunctions.sh
Line 81 in 78bc337
get_mac():
linuxmuster-common/share/helperfunctions.sh
Line 92 in 78bc337
linuxmuster-common/share/helperfunctions.sh
Line 94 in 78bc337
linuxmuster-common/share/helperfunctions.sh
Line 96 in 78bc337
get_ip():
linuxmuster-common/share/helperfunctions.sh
Line 107 in 78bc337
linuxmuster-common/share/helperfunctions.sh
Line 109 in 78bc337
linuxmuster-common/share/helperfunctions.sh
Line 111 in 78bc337
get_hostgroup():
linuxmuster-common/share/helperfunctions.sh
Line 133 in 78bc337
linuxmuster-common/share/helperfunctions.sh
Line 135 in 78bc337
linuxmuster-common/share/helperfunctions.sh
Line 137 in 78bc337
get_hostname_dhcp_ip():
linuxmuster-common/share/helperfunctions.sh
Line 152 in 78bc337
As discussed, it would be ideal to replace these tools with API calls to the Linuxmuster server.
Best regards, Lukas