changements mineurs
This commit is contained in:
parent
08f095edc0
commit
8f5e2c70d6
@ -1,23 +1,11 @@
|
||||
Summary: Install LALIS packages and configuration
|
||||
Name: task-lalis
|
||||
Version: 5.5
|
||||
Version: 5.6
|
||||
Release: %mkrel 1
|
||||
License: GPLv3
|
||||
Group: Tools
|
||||
Url: http://lalis.fr
|
||||
BuildArch: noarch
|
||||
Source1: journald.conf
|
||||
Source2: lalistunnel
|
||||
Source3: Lalis.desktop
|
||||
Source4: identMM.pl
|
||||
Source5: test.desktop
|
||||
Source6: checklist.txt
|
||||
Source8: ssh_id_rsa
|
||||
Source9: RPM-GPG-KEY-Lalis
|
||||
Source10: lalis-i586.repo
|
||||
Source11: lalis-i586-source.repo
|
||||
Source12: lalis-x86_64.repo
|
||||
Source13: lalis-x86_64-source.repo
|
||||
|
||||
Requires: task-lalis-minimal
|
||||
Requires: celestia
|
||||
@ -53,6 +41,7 @@ Summary: Install minimal LALIS packages and configuration
|
||||
Group: Tools
|
||||
BuildArch: noarch
|
||||
|
||||
Requires: lalis-config
|
||||
Requires: msttcore-fonts-installer
|
||||
Requires: sweeper
|
||||
Requires: iotop
|
||||
@ -137,134 +126,14 @@ Requires: kdeconnect-kde
|
||||
Requires: chromium-browser-stable
|
||||
Requires: nextcloud-client
|
||||
Requires: nextcloud-client-dolphin
|
||||
Requires: tigervnc-server
|
||||
|
||||
Obsoletes: task-lalis < 4
|
||||
|
||||
|
||||
%description minimal
|
||||
This package installs LALIS minimal choosen packages and some configurations.
|
||||
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
mkdir -p %{buildroot}%{_datadir}/lalis
|
||||
mkdir %{buildroot}%{_datadir}/kio_desktop
|
||||
mkdir -p %{buildroot}%{_datadir}/dist/desktop-files/default
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/pki/rpm-gpg
|
||||
mkdir %{buildroot}%{_sysconfdir}/yum.repos.d
|
||||
cp %{SOURCE2} %{buildroot}%{_bindir}
|
||||
cp %{SOURCE4} %{buildroot}%{_bindir}
|
||||
cp %{SOURCE3} %{buildroot}%{_datadir}/kio_desktop/
|
||||
cp %{SOURCE3} %{buildroot}%{_datadir}/dist/desktop-files/default/
|
||||
cp %{SOURCE5} %{buildroot}%{_datadir}/dist/desktop-files/default/
|
||||
cp %{SOURCE1} %{buildroot}%{_datadir}/lalis/
|
||||
cp %{SOURCE6} %{buildroot}%{_datadir}/lalis/
|
||||
cp %{SOURCE8} %{buildroot}%{_datadir}/lalis/
|
||||
cp %{SOURCE9} %{buildroot}%{_sysconfdir}/pki/rpm-gpg/
|
||||
cp %{SOURCE10} %{buildroot}%{_sysconfdir}/yum.repos.d/
|
||||
cp %{SOURCE11} %{buildroot}%{_sysconfdir}/yum.repos.d/
|
||||
cp %{SOURCE12} %{buildroot}%{_sysconfdir}/yum.repos.d/
|
||||
cp %{SOURCE13} %{buildroot}%{_sysconfdir}/yum.repos.d/
|
||||
|
||||
%files
|
||||
|
||||
|
||||
%files minimal
|
||||
|
||||
%{_bindir}/lalistunnel
|
||||
%{_bindir}/identMM.pl
|
||||
%{_datadir}/lalis/ssh_id_rsa
|
||||
%{_datadir}/lalis/journald.conf
|
||||
%{_datadir}/kio_desktop/Lalis.desktop
|
||||
%{_datadir}/lalis/*
|
||||
%{_datadir}/dist/desktop-files/default/*
|
||||
%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-Lalis
|
||||
%{_sysconfdir}/yum.repos.d/*
|
||||
|
||||
%post minimal
|
||||
|
||||
# configuration de l'assistance à distance
|
||||
# crée un utilisateur Lalis et enlève les droits de lecture/écriture/visibilité/exécution à others
|
||||
desktop()
|
||||
{
|
||||
if [ -f "$1/.config/user-dirs.dirs" ]; then
|
||||
DESKTOP=`grep XDG_DESKTOP_DIR $1/.config/user-dirs.dirs`
|
||||
DESKTOP=`echo ${DESKTOP##*/} | sed -e s/\"//g`
|
||||
else
|
||||
DESKTOP=""
|
||||
fi
|
||||
}
|
||||
|
||||
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
|
||||
fi
|
||||
|
||||
# Ajoute l'utilisateur lalis à la liste des utilisateurs autorisés à se connecter en ssh
|
||||
if [ -z "`grep lalis /etc/ssh/sshd_config`" ]; 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
|
||||
fi
|
||||
fi
|
||||
/usr/bin/systemctl restart sshd
|
||||
|
||||
# Ajoute le fichier test.desktop sur le bureau de l'utilisateur lalis
|
||||
desktop /home/lalis
|
||||
echo $DESKTOP
|
||||
if [ "$DESKTOP" = "" ]; then
|
||||
/usr/bin/mkdir "/home/lalis/$DESKTOP"
|
||||
|
||||
fi
|
||||
|
||||
chmod a+rw /usr/share/lalis/checklist.txt
|
||||
cp /usr/share/dist/desktop-files/default/test.desktop /home/lalis/$DESKTOP/
|
||||
chown lalis:lalis -R /home/lalis/$DESKTOP/test.desktop
|
||||
# Copie le fichier Lalis.desktop dans le dossier /etc/skel
|
||||
cp -f /usr/share/kio_desktop/Lalis.desktop /etc/skel/$DESKTOP
|
||||
|
||||
# Copie le fichier Lalis.desktop sur le bureau des utilisateurs existant
|
||||
cp -f /usr/share/kio_desktop/Lalis.desktop /usr/share/dist/desktop-files/default/
|
||||
for i in /home/*
|
||||
do
|
||||
USER=`basename "$i"`
|
||||
getent passwd "$USER"
|
||||
if [ ${?} -eq 0 ]; then
|
||||
if [ -d $i ]; then
|
||||
desktop "/$i"
|
||||
echo $DESKTOP
|
||||
if ! [ -d "$i/$DESKTOP" ]; then
|
||||
su -c "mkdir $i/$DESKTOP" - "$USER"
|
||||
echo "su -c mkdir $i/$DESKTOP - $USER"
|
||||
fi
|
||||
cp -fa /usr/share/kio_desktop/Lalis.desktop "$i/$DESKTOP/"
|
||||
chown $USER:$USER "$i/$DESKTOP"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
#disabling mdadm when no raid detected
|
||||
MD=`grep -c active /proc/mdstat`
|
||||
if [ $MD > 0 ]; then
|
||||
systemctl disable mdadm.service
|
||||
fi
|
||||
|
||||
#disabling network-up if nfs not used
|
||||
if [ ! -e /etc/nfs.conf ]; then
|
||||
systemctl disable network-up
|
||||
fi
|
||||
ARCH=`uname -i`
|
||||
U=`uname -r`
|
||||
MGAVERSION=${U##*.mga}
|
||||
|
||||
#adding lalis mirror
|
||||
grep -q 'lalis rsync://lalis69.ddns.net:10073/mageia/lalis/' /etc/urpmi/urpmi.cfg
|
||||
if [ ${?} -ne 0 ]; then
|
||||
echo -e "\nlalis rsync://lalis69.ddns.net:10073/mageia/lalis/$MGAVERSION/x86_64/media/core {\n}" >>/etc/urpmi/urpmi.cfg
|
||||
echo "urpmi.update lalis;urpmi msttcore-fonts-installer" | at now +2 minutes
|
||||
fi
|
||||
|
Reference in New Issue
Block a user