Compare commits
18 commits
Author | SHA1 | Date | |
---|---|---|---|
77cc7fcf2a | |||
a235cfa3fa | |||
a19b196010 | |||
525cba5906 | |||
9287d6470b | |||
e18102d5ae | |||
9686cc6f11 | |||
ef7570cd47 | |||
2687387c42 | |||
8b3483e411 | |||
e36c0867c7 | |||
886a17fd89 | |||
21c5700337 | |||
54712eea8b | |||
5c6608d420 | |||
ace138d377 | |||
5db8d69cde | |||
57262fc556 |
13 changed files with 88 additions and 40 deletions
4
conf/fusioninventory.conf
Normal file
4
conf/fusioninventory.conf
Normal 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"
|
1
files/apt/10.stretch_backport.list
Normal file
1
files/apt/10.stretch_backport.list
Normal file
|
@ -0,0 +1 @@
|
||||||
|
deb http://deb.debian.org/debian stretch-backports main contrib non-free
|
7
files/apt/20-stable
Normal file
7
files/apt/20-stable
Normal 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
1
files/apt/20.sid.list
Normal file
|
@ -0,0 +1 @@
|
||||||
|
deb http://ftp.debian.org/debian sid main
|
|
@ -1,3 +1,2 @@
|
||||||
APT::Periodic::Update-Package-Lists "1";
|
APT::Periodic::Update-Package-Lists "1";
|
||||||
APT::Periodic::Unattended-Upgrade "1";
|
APT::Periodic::Unattended-Upgrade "1";
|
||||||
APT::Periodic::AutocleanInterval "7";
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
// ACAQB unattended upgrades configuration file
|
// ACAQB unattended upgrades configuration file
|
||||||
Unattended-Upgrade::Origins-Pattern {
|
Unattended-Upgrade::Origin-Pattern {
|
||||||
"o=Debian,n=${distro_codename}";
|
"o=Debian,n=stretch";
|
||||||
"o=Debian,n=${distro_codename}-updates";
|
"o=Debian,n=stretch-updates";
|
||||||
"o=Debian,n=${distro_codename},l=Debian-Security";
|
"o=Debian,n=stretch,l=Debian-Security";
|
||||||
|
"o=Debian,n=sid";
|
||||||
};
|
};
|
||||||
Unattended-Upgrade::Remove-Unused-Dependencies "true";
|
Unattended-Upgrade::Remove-Unused-Dependencies "true";
|
||||||
Unattended-Upgrade::MinimalSteps "true";
|
Unattended-Upgrade::MinimalSteps "true";
|
||||||
Unattended-Upgrade::AutoFixInterruptedDpkg "true";
|
|
||||||
Acquire::http::Dl-Limit "50";
|
Acquire::http::Dl-Limit "50";
|
||||||
|
|
3
files/apt/60-libreoffice
Normal file
3
files/apt/60-libreoffice
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Package: ~/libreoffice/
|
||||||
|
Pin: release n=stretch-backports
|
||||||
|
Pin-Priority: 991
|
3
files/apt/60-remmina
Normal file
3
files/apt/60-remmina
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Package: remmina remmina-plugin-rdp
|
||||||
|
Pin: release n=stretch-backports
|
||||||
|
Pin-Priority: 991
|
3
files/apt/80-fusioninventory
Normal file
3
files/apt/80-fusioninventory
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Package: fusioninventory-agent
|
||||||
|
Pin: release n=sid
|
||||||
|
Pin-Priority: 991
|
3
files/apt/80-papirus-icon-theme
Normal file
3
files/apt/80-papirus-icon-theme
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Package: papirus-icon-theme
|
||||||
|
Pin: release n=sid
|
||||||
|
Pin-Priority: 991
|
|
@ -4,6 +4,12 @@ pulseaudio
|
||||||
unzip
|
unzip
|
||||||
unattended-upgrades
|
unattended-upgrades
|
||||||
apt-listchanges
|
apt-listchanges
|
||||||
|
exfat-utils
|
||||||
|
exfat-fuse
|
||||||
|
ntfs-3g
|
||||||
|
firmware-linux
|
||||||
|
firmware-linux-nonfree
|
||||||
|
firmware-realtek
|
||||||
|
|
||||||
# Desktop
|
# Desktop
|
||||||
xorg
|
xorg
|
||||||
|
@ -22,6 +28,7 @@ xfce4-systemload-plugin
|
||||||
thunar-archive-plugin
|
thunar-archive-plugin
|
||||||
gnome-system-tools
|
gnome-system-tools
|
||||||
gnome-disk-utility
|
gnome-disk-utility
|
||||||
|
gnome-keyring
|
||||||
plank
|
plank
|
||||||
|
|
||||||
#Printing
|
#Printing
|
||||||
|
@ -54,6 +61,9 @@ thunderbird
|
||||||
thunderbird-l10n-fr
|
thunderbird-l10n-fr
|
||||||
vlc
|
vlc
|
||||||
vlc-l10n
|
vlc-l10n
|
||||||
|
remmina
|
||||||
|
remmina-plugin-rdp
|
||||||
|
xarchiver
|
||||||
|
|
||||||
#FI Agent
|
#FI Agent
|
||||||
fusioninventory-agent
|
fusioninventory-agent
|
||||||
|
|
3
files/sources.list
Normal file
3
files/sources.list
Normal 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
|
79
install.sh
79
install.sh
|
@ -12,62 +12,61 @@ source lib/download.sh
|
||||||
source conf/init.sh
|
source conf/init.sh
|
||||||
|
|
||||||
#Variables override
|
#Variables override
|
||||||
for i in conf/*
|
for i in $(ls conf/*.conf)
|
||||||
do
|
do
|
||||||
source "$i"
|
source $i
|
||||||
done
|
done
|
||||||
|
|
||||||
erase_display_char () {
|
erase_display_char () {
|
||||||
local i
|
let "i=0"
|
||||||
i=0
|
while [ $i -lt $1 ]; do
|
||||||
while [ "$i" -lt "$1" ]; do
|
|
||||||
message "\b \b"
|
message "\b \b"
|
||||||
(( i=i + 1 ))
|
let "i=$i + 1"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
install () {
|
install () {
|
||||||
nchar=0
|
nchar=0
|
||||||
message "\nInstall $1 : "
|
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=""
|
display=""
|
||||||
pkg_name=""
|
pkg_name=""
|
||||||
case $x in
|
case $x in
|
||||||
Get*)
|
Get*)
|
||||||
pkg_name=$(echo "$x" | awk '{ printf $5 }')
|
pkg_name=$(echo $x | awk '{ printf $5 }')
|
||||||
display="downloading"
|
display="downloading"
|
||||||
;;
|
;;
|
||||||
Unpack*)
|
Unpack*)
|
||||||
pkg_name=$(echo "$x" | awk '{ printf $2 }')
|
pkg_name=$(echo $x | awk '{ printf $2 }')
|
||||||
display="Unpacking"
|
display="Unpacking"
|
||||||
;;
|
;;
|
||||||
*already*newest*)
|
*already*newest*)
|
||||||
pkg_name=$(echo "$x" | awk '{ printf $1 }')
|
pkg_name=$(echo $x | awk '{ printf $1 }')
|
||||||
display="Already Ins talled"
|
display="Already Installed"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
if [ -n "$display" ]
|
if [ ! -z "$display" ]
|
||||||
then
|
then
|
||||||
display="$display $pkg_name"
|
display="$display $pkg_name"
|
||||||
erase_display_char $nchar
|
erase_display_char $nchar
|
||||||
message "$display" "info"
|
message "$display" "info"
|
||||||
nchar=${#display}
|
nchar=${#display}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
message " done" "ok"
|
message " done" "ok"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
process_package_file (){
|
process_package_file (){
|
||||||
for p in $(cat "$1" | grep '^[^#].*')
|
for p in `cat $1 | grep '^[^#].*'`
|
||||||
do
|
do
|
||||||
install "$p"
|
install $p
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
create_fusioninv_conf () {
|
create_fusioninv_conf () {
|
||||||
# Process Config file
|
# Process Config file
|
||||||
message "\nP rocess Fusion inventory configuration file : "
|
message "\nProcess Fusion inventory configuration file : "
|
||||||
#remove comments
|
#remove comments
|
||||||
sed -i '/^#/ d' ${FI_CONF_FILE}
|
sed -i '/^#/ d' ${FI_CONF_FILE}
|
||||||
sed -i '/^$/ d' ${FI_CONF_FILE}
|
sed -i '/^$/ d' ${FI_CONF_FILE}
|
||||||
|
@ -83,39 +82,35 @@ create_fusioninv_conf () {
|
||||||
}
|
}
|
||||||
|
|
||||||
configure_drm(){
|
configure_drm(){
|
||||||
if grep -q drm "$INITRAMFS_CONF_FILE"
|
if [ -z "$(grep -o drm $INITRAMFS_CONF_FILE)" ]
|
||||||
then
|
then
|
||||||
|
echo "drm" >> $INITRAMFS_CONF_FILE
|
||||||
|
else
|
||||||
message "DRM already done " "warn"
|
message "DRM already done " "warn"
|
||||||
else
|
|
||||||
echo "drm" >> "$INITRAMFS_CONF_FILE"
|
|
||||||
fi
|
fi
|
||||||
if grep -q "$1" "$INITRAMFS_CONF_FILE"
|
if [ -z "$(grep -o $1 $INITRAMFS_CONF_FILE)" ]
|
||||||
then
|
then
|
||||||
message "$1 already done " "warn"
|
echo "$1 modeset=1" >> $INITRAMFS_CONF_FILE
|
||||||
else
|
else
|
||||||
echo "$1 modeset=1" >> "$INITRAMFS_CONF_FILE"
|
message "$1 already done " "warn"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
configure_grub (){
|
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
|
update-grub2 2>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
configure_plymouth (){
|
configure_plymouth (){
|
||||||
local module
|
local module=$(lsmod | grep -o "i915\|radeon" | head -1)
|
||||||
module=$(lsmod | grep -o "i915\|radeon" | head -1)
|
|
||||||
if [ ! "$module" == "" ]
|
if [ ! "$module" == "" ]
|
||||||
then
|
then
|
||||||
message "\nConfigure drm modules for $module : "
|
message "\nConfigure drm modules for $module : "
|
||||||
configure_drm "$module"
|
configure_drm $module
|
||||||
message "done" "ok"
|
message "done" "ok"
|
||||||
message "\nConfigure grub command line : "
|
message "\nConfigure grub command line : "
|
||||||
|
local splash_enable=$(sed -rn 's/GRUB_CMDLINE_LINUX_DEFAULT=\"(.*)\"/\1/p' ${GRUB_DEFAULT_CONF_FILE} | grep -o "splash" )
|
||||||
local splash_enable
|
[[ -z $splash_enable ]] && configure_grub || message "Grub splash kernel option exist " "warn"
|
||||||
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
|
|
||||||
message "done" "ok"
|
message "done" "ok"
|
||||||
message "\nSelect plymouth theme : "
|
message "\nSelect plymouth theme : "
|
||||||
plymouth-set-default-theme -R spinner &>/dev/null
|
plymouth-set-default-theme -R spinner &>/dev/null
|
||||||
|
@ -126,6 +121,13 @@ configure_plymouth (){
|
||||||
fi
|
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
|
apt-get update &>/dev/null
|
||||||
process_package_file files/packages.list
|
process_package_file files/packages.list
|
||||||
|
@ -133,8 +135,6 @@ process_package_file files/packages.list
|
||||||
message "Activate unattended upgrades : "
|
message "Activate unattended upgrades : "
|
||||||
cp ./files/apt/20auto-upgrades /etc/apt/apt.conf.d/
|
cp ./files/apt/20auto-upgrades /etc/apt/apt.conf.d/
|
||||||
cp ./files/apt/50unattended-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 "done" "ok"
|
||||||
|
|
||||||
message "\ninstall custom background images : "
|
message "\ninstall custom background images : "
|
||||||
|
@ -154,7 +154,18 @@ message "\nCreate users default parameters : "
|
||||||
cp -R files/skel/ /etc/ &> /dev/null
|
cp -R files/skel/ /etc/ &> /dev/null
|
||||||
message "OK" "ok"
|
message "OK" "ok"
|
||||||
|
|
||||||
|
message "\nConfigure fusioninventory"
|
||||||
|
create_fusioninv_conf
|
||||||
|
message "OK" "ok"
|
||||||
|
|
||||||
#remove interface file until NM use network
|
#remove interface file until NM use network
|
||||||
rm -rf /etc/network/interfaces
|
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 *
|
||||||
|
|
Reference in a new issue