You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ublinux-init/ublinux/rc.xorg/50-domain_join

37 lines
946 B

#!/bin/bash
# to be sourced
ENABLED=yes
[[ ${ENABLED} == "yes" ]] || exit 0
SOURCE=/usr/lib/ublinux/default; [[ -f ${SOURCE} ]] && . ${SOURCE} 2>/dev/null || exit 0
SOURCE=${SYSCONF}/config; [[ -f ${SOURCE} ]] && . ${SOURCE} 2>/dev/null
SOURCE=${SYSCONF}/network; [[ -f ${SOURCE} ]] && . ${SOURCE} 2>/dev/null
if [ ! -z "$ADSERVER" ] ;then
export PATH=$PATH:/usr/lib/ublinux/scripts:/opt/secretnet/sbin:/opt/secretnet/bin:/usr/lib/qt4/bin
# Time synchronization
systemctl stop ntpd
/usr/sbin/ntpdate $ADSERVER >/dev/null 2>&1
systemctl start ntpd
if ! echo -e "\n\n\n" | net ads testjoin ;then
/usr/share/ublinux/ad_join/ad_join.pl
fi
xsetroot -cursor_name left_ptr
systemctl restart smb
systemctl restart winbind
# launch some rc scripts
for a in /usr/lib/ublinux/rc.domain/* ;do
[ -x $a ] && $a
done
for a in /usr/lib/ublinux/rc.domain.d/* ;do
[ -x $a ] && $a &
done
fi