1
0
This commit is contained in:
Daniel Tartavel 2023-09-18 15:50:03 +02:00
parent 45d839893b
commit 5728075542
2 changed files with 10 additions and 8 deletions

View File

@ -1,7 +1,7 @@
Summary: Install LALIS configuration
Name: lalis-config
Version: 1
Release: %mkrel 3
Version: 2
Release: %mkrel 1
License: GPLv3
Group: Tools
Url: http://lalis.fr
@ -12,7 +12,7 @@ Source3: Lalis.desktop
Source4: identMM.pl
Source5: test.desktop
Source6: checklist.txt
Source8: ssh_id_rsa
Source8: ssh_id_rsa.pub
Source9: RPM-GPG-KEY-Lalis
Source10: lalis-i586.repo
Source11: lalis-i586-source.repo
@ -63,7 +63,6 @@ cp %{SOURCE13} %{buildroot}%{_sysconfdir}/yum.repos.d/
%post
# configuration de l'assistance à distance
# trouve le nom du dossier de bureau
desktop()
{
if [ -f "$1/.config/user-dirs.dirs" ]; then
@ -77,13 +76,14 @@ if [ $1 -eq 1 ];then
# crée un utilisateur Lalis et enlève les droits de lecture/écriture/visibilité/exécution à others
cp -f /usr/share/lalis/journald.conf /etc/systemd/
getent passwd lalis
if [ ${?} -ne 0 ]; then
adduser lalis
chmod -R o-rwX /home/lalis
passwd lalis << EOF
Lalis
Lalis
EOF
Lalis
Lalis
EOF
fi
# Ajoute l'utilisateur lalis à la liste des utilisateurs autorisés à se connecter en ssh
@ -92,7 +92,7 @@ if [ $1 -eq 1 ];then
if [ -z "`grep -i allowusers /etc/ssh/sshd_config`" ]; then
echo "Allowusers lalis" >>/etc/ssh/sshd_config
else
sed -i -e 's/^Allowusers.*$/& lalis/g' /etc/ssh/sshd_config
sed -i -e 's/^Allowusers.*/& lalis/g' /etc/ssh/sshd_config
fi
fi
echo "relance sshd"
@ -157,6 +157,7 @@ if [ $1 -eq 1 ];then
echo "urpmi.update lalis" | at now +1 minutes
fi
fi
echo "post end"
%postun

1
mockdt.cfg Normal file
View File

@ -0,0 +1 @@
NOARCH=1