Compare commits
11 commits
Author | SHA1 | Date | |
---|---|---|---|
1afbbdb4a5 | |||
2de484a0b4 | |||
46845929ae | |||
fa21149889 | |||
f7fdcacfe6 | |||
152da7d8b1 | |||
0062323e4d | |||
7409cc883c | |||
18a3347225 | |||
8fc0f8cbd4 | |||
97a97d56e8 |
13 changed files with 41 additions and 89 deletions
|
@ -1,4 +0,0 @@
|
|||
FI_SERVER="https://agent.dg.acaqb.net/"
|
||||
FI_PROXY_USER="agent"
|
||||
FI_PROXY_PASS="kE9TDtP63xwK"
|
||||
FI_CONF_FILE="/etc/fusioninventory/agent.cfg"
|
|
@ -1 +0,0 @@
|
|||
deb http://deb.debian.org/debian stretch-backports main contrib non-free
|
|
@ -1,7 +0,0 @@
|
|||
Package: *
|
||||
Pin:release n=sid
|
||||
Pin-Priority:-10
|
||||
|
||||
Package: *
|
||||
Pin:release n=stretch-backport
|
||||
Pin-Priority:-10
|
|
@ -1 +0,0 @@
|
|||
deb http://ftp.debian.org/debian sid main
|
|
@ -1,2 +1,3 @@
|
|||
APT::Periodic::Update-Package-Lists "1";
|
||||
APT::Periodic::Unattended-Upgrade "1";
|
||||
APT::Periodic::AutocleanInterval "7";
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// ACAQB unattended upgrades configuration file
|
||||
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::Origins-Pattern {
|
||||
"o=Debian,n=${distro_codename}";
|
||||
"o=Debian,n=${distro_codename}-updates";
|
||||
"o=Debian,n=${distro_codename},l=Debian-Security";
|
||||
};
|
||||
Unattended-Upgrade::Remove-Unused-Dependencies "true";
|
||||
Unattended-Upgrade::MinimalSteps "true";
|
||||
Unattended-Upgrade::AutoFixInterruptedDpkg "true";
|
||||
Acquire::http::Dl-Limit "50";
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
Package: ~/libreoffice/
|
||||
Pin: release n=stretch-backports
|
||||
Pin-Priority: 991
|
|
@ -1,3 +0,0 @@
|
|||
Package: remmina remmina-plugin-rdp
|
||||
Pin: release n=stretch-backports
|
||||
Pin-Priority: 991
|
|
@ -1,3 +0,0 @@
|
|||
Package: fusioninventory-agent
|
||||
Pin: release n=sid
|
||||
Pin-Priority: 991
|
|
@ -1,3 +0,0 @@
|
|||
Package: papirus-icon-theme
|
||||
Pin: release n=sid
|
||||
Pin-Priority: 991
|
|
@ -4,12 +4,6 @@ pulseaudio
|
|||
unzip
|
||||
unattended-upgrades
|
||||
apt-listchanges
|
||||
exfat-utils
|
||||
exfat-fuse
|
||||
ntfs-3g
|
||||
firmware-linux
|
||||
firmware-linux-nonfree
|
||||
firmware-realtek
|
||||
|
||||
# Desktop
|
||||
xorg
|
||||
|
@ -28,7 +22,6 @@ xfce4-systemload-plugin
|
|||
thunar-archive-plugin
|
||||
gnome-system-tools
|
||||
gnome-disk-utility
|
||||
gnome-keyring
|
||||
plank
|
||||
|
||||
#Printing
|
||||
|
@ -61,9 +54,6 @@ thunderbird
|
|||
thunderbird-l10n-fr
|
||||
vlc
|
||||
vlc-l10n
|
||||
remmina
|
||||
remmina-plugin-rdp
|
||||
xarchiver
|
||||
|
||||
#FI Agent
|
||||
fusioninventory-agent
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
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
|
81
install.sh
81
install.sh
|
@ -12,61 +12,62 @@ source lib/download.sh
|
|||
source conf/init.sh
|
||||
|
||||
#Variables override
|
||||
for i in $(ls conf/*.conf)
|
||||
for i in conf/*
|
||||
do
|
||||
source $i
|
||||
source "$i"
|
||||
done
|
||||
|
||||
erase_display_char () {
|
||||
let "i=0"
|
||||
while [ $i -lt $1 ]; do
|
||||
local i
|
||||
i=0
|
||||
while [ "$i" -lt "$1" ]; do
|
||||
message "\b \b"
|
||||
let "i=$i + 1"
|
||||
(( 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 x; do
|
||||
LC_ALL=C apt-get install --no-install-recommends -y "$1" 2>/dev/null | while read -r 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 Installed"
|
||||
pkg_name=$(echo "$x" | awk '{ printf $1 }')
|
||||
display="Already Ins talled"
|
||||
;;
|
||||
esac
|
||||
if [ ! -z "$display" ]
|
||||
if [ -n "$display" ]
|
||||
then
|
||||
display="$display $pkg_name"
|
||||
erase_display_char $nchar
|
||||
message "$display" "info"
|
||||
nchar=${#display}
|
||||
fi
|
||||
fi
|
||||
done
|
||||
message " done" "ok"
|
||||
|
||||
}
|
||||
|
||||
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 "\nProcess Fusion inventory configuration file : "
|
||||
message "\nP rocess Fusion inventory configuration file : "
|
||||
#remove comments
|
||||
sed -i '/^#/ d' ${FI_CONF_FILE}
|
||||
sed -i '/^$/ d' ${FI_CONF_FILE}
|
||||
|
@ -82,35 +83,39 @@ create_fusioninv_conf () {
|
|||
}
|
||||
|
||||
configure_drm(){
|
||||
if [ -z "$(grep -o drm $INITRAMFS_CONF_FILE)" ]
|
||||
if grep -q drm "$INITRAMFS_CONF_FILE"
|
||||
then
|
||||
echo "drm" >> $INITRAMFS_CONF_FILE
|
||||
else
|
||||
message "DRM already done " "warn"
|
||||
fi
|
||||
if [ -z "$(grep -o $1 $INITRAMFS_CONF_FILE)" ]
|
||||
then
|
||||
echo "$1 modeset=1" >> $INITRAMFS_CONF_FILE
|
||||
else
|
||||
echo "drm" >> "$INITRAMFS_CONF_FILE"
|
||||
fi
|
||||
if grep -q "$1" "$INITRAMFS_CONF_FILE"
|
||||
then
|
||||
message "$1 already done " "warn"
|
||||
else
|
||||
echo "$1 modeset=1" >> "$INITRAMFS_CONF_FILE"
|
||||
fi
|
||||
}
|
||||
|
||||
configure_grub (){
|
||||
sed -Ei "s/^GRUB_CMDLINE_LINUX_DEFAULT=\"(.*)\"/GRUB_CMDLINE_LINUX_DEFAULT=\"\1 splash\"/g" ${GRUB_DEFAULT_CONF_FILE} >/dev/null
|
||||
sed -E "s/^GRUB_CMDLINE_LINUX_DEFAULT=\"(.*)\"/GRUB_CMDLINE_LINUX_DEFAULT=\"\1 spash\"/g" ${GRUB_DEFAULT_CONF_FILE} >/dev/null
|
||||
update-grub2 2>/dev/null
|
||||
}
|
||||
|
||||
configure_plymouth (){
|
||||
local module=$(lsmod | grep -o "i915\|radeon" | head -1)
|
||||
local module
|
||||
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=$(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"
|
||||
|
||||
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
|
||||
message "done" "ok"
|
||||
message "\nSelect plymouth theme : "
|
||||
plymouth-set-default-theme -R spinner &>/dev/null
|
||||
|
@ -121,13 +126,6 @@ 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
|
||||
|
@ -135,6 +133,8 @@ 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,18 +154,7 @@ 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
|
||||
|
||||
#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 *
|
||||
exit 0
|
||||
|
|
Reference in a new issue