-
Notifications
You must be signed in to change notification settings - Fork 0
Adjustments for a separate Linbo installation #1
Description
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():
linuxmuster-common/share/helperfunctions.sh
Line 107 in 78bc337
$LDBSEARCH "(sophomorixDnsNodename=$(tolower $1))" $attr | grep ^$attr | awk '{print $2}' linuxmuster-common/share/helperfunctions.sh
Line 109 in 78bc337
$LDBSEARCH "(sophomorixComputerMAC=$(toupper $1))" $attr | grep ^$attr | awk '{print $2}' linuxmuster-common/share/helperfunctions.sh
Line 111 in 78bc337
$LDBSEARCH "($attr=$1)" $attr | grep ^$attr | awk '{print $2}'
get_hostgroup():
linuxmuster-common/share/helperfunctions.sh
Line 133 in 78bc337
schoolprefix=$($LDBSEARCH "(sophomorixDnsNodename="$(tolower $1)")" sophomorixSchoolPrefix | grep sophomorixSchoolPrefix | awk '{print $2}') linuxmuster-common/share/helperfunctions.sh
Line 135 in 78bc337
$LDBSEARCH "(sophomorixDnsNodename="$(tolower $1)")" memberOf | grep ,OU=device-groups, | awk -F= '{print $2}' | awk -F, '{print $1}' | sed 's|^d_||' linuxmuster-common/share/helperfunctions.sh
Line 137 in 78bc337
$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():
linuxmuster-common/share/helperfunctions.sh
Line 152 in 78bc337
get_hostname "$macaddr"
As discussed, it would be ideal to replace these tools with API calls to the Linuxmuster server.
Best regards, Lukas