Compare commits

..

18 commits

Author SHA1 Message Date
77cc7fcf2a Add missing packages 2020-11-12 13:11:17 +01:00
a235cfa3fa Add apt-listchanges packages 2020-10-26 16:08:11 +01:00
a19b196010 Add exfat and ntfs support 2020-10-26 15:42:40 +01:00
525cba5906 Add trailing slash for FI URL 2018-05-03 14:41:23 +02:00
9287d6470b Add fusioninventory confiuration 2018-05-03 14:40:18 +02:00
e18102d5ae Various fixes 2018-05-03 13:11:16 +02:00
9686cc6f11 Merge branch 'master' into acaqb 2018-05-02 11:31:20 +02:00
ef7570cd47 Syntax error in apt pin file 2018-05-02 11:16:23 +02:00
2687387c42 master merge 2018-05-02 11:10:53 +02:00
8b3483e411 Merge branch 'master' into acaqb 2018-05-02 10:47:40 +02:00
e36c0867c7 Error in release name 2018-05-02 10:47:12 +02:00
886a17fd89 Copy missing files for repo managing 2018-05-02 10:46:20 +02:00
21c5700337 Error in variable name configure_plymouth 2018-05-02 10:42:05 +02:00
54712eea8b Add remmina and remmina-plugin-rdp package 2018-05-02 10:38:22 +02:00
5c6608d420 Merge branch 'master' into acaqb 2018-05-02 10:34:03 +02:00
ace138d377 Copy backport source list 2018-05-02 10:33:39 +02:00
5db8d69cde Add configuration file for fusioninventory 2018-05-02 10:28:44 +02:00
57262fc556 Configure Backport for Libreoffice and Remmina 2018-05-02 10:24:05 +02:00
13 changed files with 88 additions and 40 deletions

View file

@ -0,0 +1,4 @@
FI_SERVER="https://agent.dg.acaqb.net/"
FI_PROXY_USER="agent"
FI_PROXY_PASS="kE9TDtP63xwK"
FI_CONF_FILE="/etc/fusioninventory/agent.cfg"

View file

@ -0,0 +1 @@
deb http://deb.debian.org/debian stretch-backports main contrib non-free

7
files/apt/20-stable Normal file
View file

@ -0,0 +1,7 @@
Package: *
Pin:release n=sid
Pin-Priority:-10
Package: *
Pin:release n=stretch-backport
Pin-Priority:-10

1
files/apt/20.sid.list Normal file
View file

@ -0,0 +1 @@
deb http://ftp.debian.org/debian sid main

View file

@ -1,3 +1,2 @@
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
APT::Periodic::AutocleanInterval "7";

View file

@ -1,10 +1,10 @@
// ACAQB unattended upgrades configuration file
Unattended-Upgrade::Origins-Pattern {
"o=Debian,n=${distro_codename}";
"o=Debian,n=${distro_codename}-updates";
"o=Debian,n=${distro_codename},l=Debian-Security";
Unattended-Upgrade::Origin-Pattern {
"o=Debian,n=stretch";
"o=Debian,n=stretch-updates";
"o=Debian,n=stretch,l=Debian-Security";
"o=Debian,n=sid";
};
Unattended-Upgrade::Remove-Unused-Dependencies "true";
Unattended-Upgrade::MinimalSteps "true";
Unattended-Upgrade::AutoFixInterruptedDpkg "true";
Acquire::http::Dl-Limit "50";

3
files/apt/60-libreoffice Normal file
View file

@ -0,0 +1,3 @@
Package: ~/libreoffice/
Pin: release n=stretch-backports
Pin-Priority: 991

3
files/apt/60-remmina Normal file
View file

@ -0,0 +1,3 @@
Package: remmina remmina-plugin-rdp
Pin: release n=stretch-backports
Pin-Priority: 991

View file

@ -0,0 +1,3 @@
Package: fusioninventory-agent
Pin: release n=sid
Pin-Priority: 991

View file

@ -0,0 +1,3 @@
Package: papirus-icon-theme
Pin: release n=sid
Pin-Priority: 991

View file

@ -4,6 +4,12 @@ pulseaudio
unzip
unattended-upgrades
apt-listchanges
exfat-utils
exfat-fuse
ntfs-3g
firmware-linux
firmware-linux-nonfree
firmware-realtek
# Desktop
xorg
@ -22,6 +28,7 @@ xfce4-systemload-plugin
thunar-archive-plugin
gnome-system-tools
gnome-disk-utility
gnome-keyring
plank
#Printing
@ -54,6 +61,9 @@ thunderbird
thunderbird-l10n-fr
vlc
vlc-l10n
remmina
remmina-plugin-rdp
xarchiver
#FI Agent
fusioninventory-agent

3
files/sources.list Normal file
View file

@ -0,0 +1,3 @@
deb http://ftp.fr.debian.org/debian unstable main contrib non-free
#deb http://ftp.fr.debian.org/debian unstable-updates main
#deb http://ftp.fr.debian.org/ unstable/updates main

View file

@ -12,41 +12,40 @@ source lib/download.sh
source conf/init.sh
#Variables override
for i in conf/*
for i in $(ls conf/*.conf)
do
source "$i"
source $i
done
erase_display_char () {
local i
i=0
while [ "$i" -lt "$1" ]; do
let "i=0"
while [ $i -lt $1 ]; do
message "\b \b"
(( i=i + 1 ))
let "i=$i + 1"
done
}
install () {
nchar=0
message "\nInstall $1 : "
LC_ALL=C apt-get install --no-install-recommends -y "$1" 2>/dev/null | while read -r x; do
LC_ALL=C apt-get install --no-install-recommends -y $1 2>/dev/null | while read x; do
display=""
pkg_name=""
case $x in
Get*)
pkg_name=$(echo "$x" | awk '{ printf $5 }')
pkg_name=$(echo $x | awk '{ printf $5 }')
display="downloading"
;;
Unpack*)
pkg_name=$(echo "$x" | awk '{ printf $2 }')
pkg_name=$(echo $x | awk '{ printf $2 }')
display="Unpacking"
;;
*already*newest*)
pkg_name=$(echo "$x" | awk '{ printf $1 }')
display="Already Ins talled"
pkg_name=$(echo $x | awk '{ printf $1 }')
display="Already Installed"
;;
esac
if [ -n "$display" ]
if [ ! -z "$display" ]
then
display="$display $pkg_name"
erase_display_char $nchar
@ -59,15 +58,15 @@ install () {
}
process_package_file (){
for p in $(cat "$1" | grep '^[^#].*')
for p in `cat $1 | grep '^[^#].*'`
do
install "$p"
install $p
done
}
create_fusioninv_conf () {
# Process Config file
message "\nP rocess Fusion inventory configuration file : "
message "\nProcess Fusion inventory configuration file : "
#remove comments
sed -i '/^#/ d' ${FI_CONF_FILE}
sed -i '/^$/ d' ${FI_CONF_FILE}
@ -83,39 +82,35 @@ create_fusioninv_conf () {
}
configure_drm(){
if grep -q drm "$INITRAMFS_CONF_FILE"
if [ -z "$(grep -o drm $INITRAMFS_CONF_FILE)" ]
then
echo "drm" >> $INITRAMFS_CONF_FILE
else
message "DRM already done " "warn"
else
echo "drm" >> "$INITRAMFS_CONF_FILE"
fi
if grep -q "$1" "$INITRAMFS_CONF_FILE"
if [ -z "$(grep -o $1 $INITRAMFS_CONF_FILE)" ]
then
message "$1 already done " "warn"
echo "$1 modeset=1" >> $INITRAMFS_CONF_FILE
else
echo "$1 modeset=1" >> "$INITRAMFS_CONF_FILE"
message "$1 already done " "warn"
fi
}
configure_grub (){
sed -E "s/^GRUB_CMDLINE_LINUX_DEFAULT=\"(.*)\"/GRUB_CMDLINE_LINUX_DEFAULT=\"\1 spash\"/g" ${GRUB_DEFAULT_CONF_FILE} >/dev/null
sed -Ei "s/^GRUB_CMDLINE_LINUX_DEFAULT=\"(.*)\"/GRUB_CMDLINE_LINUX_DEFAULT=\"\1 splash\"/g" ${GRUB_DEFAULT_CONF_FILE} >/dev/null
update-grub2 2>/dev/null
}
configure_plymouth (){
local module
module=$(lsmod | grep -o "i915\|radeon" | head -1)
local module=$(lsmod | grep -o "i915\|radeon" | head -1)
if [ ! "$module" == "" ]
then
message "\nConfigure drm modules for $module : "
configure_drm "$module"
configure_drm $module
message "done" "ok"
message "\nConfigure grub command line : "
local splash_enable
splash_enable=$(sed -rn 's/GRUB_CMDLINE_LINUX_DEFAULT=\"(.*)\"/\1/p' ${GRUB_DEFAULT_CONF_FILE} | grep -o "splash" )
if [ -z "$splash_enable" ]; then configure_grub; else message "Grub splash kernel option exist " "warn"; fi
local splash_enable=$(sed -rn 's/GRUB_CMDLINE_LINUX_DEFAULT=\"(.*)\"/\1/p' ${GRUB_DEFAULT_CONF_FILE} | grep -o "splash" )
[[ -z $splash_enable ]] && configure_grub || message "Grub splash kernel option exist " "warn"
message "done" "ok"
message "\nSelect plymouth theme : "
plymouth-set-default-theme -R spinner &>/dev/null
@ -126,6 +121,13 @@ configure_plymouth (){
fi
}
message "\nAdd Debian stretch backport and Sid Repository :"
cp ./files/apt/*.list /etc/apt/sources.list.d/
cp ./files/apt/20-stable /etc/apt/preferences.d/
cp ./files/apt/60-* /etc/apt/preferences.d/
cp ./files/apt/80-* /etc/apt/preferences.d/
message "done\n" "ok"
apt-get update &>/dev/null
process_package_file files/packages.list
@ -133,8 +135,6 @@ process_package_file files/packages.list
message "Activate unattended upgrades : "
cp ./files/apt/20auto-upgrades /etc/apt/apt.conf.d/
cp ./files/apt/50unattended-upgrades /etc/apt/apt.conf.d/
echo unattended-upgrades unattended-upgrades/enable_auto_updates boolean true | debconf-set-selections
dpkg-reconfigure -f noninteractive unattended-upgrades
message "done" "ok"
message "\ninstall custom background images : "
@ -154,7 +154,18 @@ message "\nCreate users default parameters : "
cp -R files/skel/ /etc/ &> /dev/null
message "OK" "ok"
message "\nConfigure fusioninventory"
create_fusioninv_conf
message "OK" "ok"
#remove interface file until NM use network
rm -rf /etc/network/interfaces
exit 0
#add elementary theme
#mkdir -p /tmp/themes/
#cd /tmp/themes/
#download master.zip https://github.com/shimmerproject/elementary-xfce/archive/
#unzip master.zip > /dev/null
#mv elementary-xfce-master/* /usr/share/icons/
#rm -rf *