Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37691133
en ru br
Репозитории ALT

Группа :: Система/Настройка/Прочее
Пакет: livecd-setauth

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

livecd-setauth/000075500000000000000000000000001230535136000137735ustar00rootroot00000000000000livecd-setauth/livecd-setauth000075500000000000000000000031431230535136000166430ustar00rootroot00000000000000#!/bin/sh
#
#
# chkconfig: 345 20 05
# description: This startup script sets auth to krb5 and activates cifs homes

WITHOUT_RC_COMPAT=1


# Source function library.
. /etc/init.d/functions
. alterator-datetime-functions
. shell-config


RETVAL=0

start()
{
auth=/usr/lib/alterator/backend3/auth
if grep -q krb5 /proc/cmdline ; then
echo "setting auth to krb5"
date=$(nc ldap 13)
[ -n "$date" ] && date -s "$date"
domain=$(host ldap | cut -d' ' -f 1| cut -d. -f 2-100)
$auth &>/dev/null <<EOF
_message:begin
action:write
auth_type:krb5
domain:$domain
_message:end
EOF
net_shares=/usr/lib/alterator/backend3/net-shares
$net_shares &>/dev/null <<EOF
_message:begin
action:write
homes:#t
_message:end
EOF
[ -f /etc/X11/gdm/custom.conf ] && subst 's/AutomaticLoginEnable/#AutomaticLoginEnable/' /etc/X11/gdm/custom.conf ||:
[ -f /etc/lightdm/lightdm.conf ] && subst 's/autologin-/#autologin-/' /etc/lightdm/lightdm.conf ||:


ip -o addr | grep '[0-9]: e[nt]' | cut -d' ' -f2 | xargs -i ip link set dev {} multicast on
fi

# Set time zone from kernel command line
ZONE=$(cat /proc/cmdline | sed -n 's/^.* tz=\([^ ]*\).*/\1/gp')
if [ -z "$ZONE" ];then
# Set in_language for read_zone
in_language=$(sed -n 's/^.* lang=\([^ ]*\).*/\1/gp' /proc/cmdline)
ZONE=$(read_zone)
fi
if [ -n "$ZONE" ];then
shell_config_set /etc/sysconfig/clock ZONE "'$ZONE'"
rm -f /etc/localtime
/etc/rc.d/init.d/clock start
fi
}

stop()
{
true
}

restart()
{
stop
start
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
*)
msg_usage "${0##*/} {start|stop}"
RETVAL=1
esac

exit $RETVAL
livecd-setauth/livecd-setauth.service000064400000000000000000000005021230535136000202730ustar00rootroot00000000000000[Unit]
Description=Automatic setup for kerberos when booting from domain controller
DefaultDependencies=no
RequiresMountsFor=/etc
After=network.service NetworkManager.service
Before=prefdm.service

[Service]
Type=oneshot
ExecStart=/etc/init.d/livecd-setauth start
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin