if test $# -lt 1; then echo "Specify in the first argument for the target Linux instalation. Use \"/\" for the current system migration from the source system, where this file must be placed, with instalation missed packages and execute the updation commands." exit 0 fi targ=$1 isCurSys=0 if test $targ = "/"; then isCurSys=1; #Typical packages instalation apt-get update apt-get dist-upgrade -y apt-get install -y pulseaudio-module-bluetooth blueman cups cups-browsed htop vim lftp synaptic-trinity gkrellm gkrellmoon gkrellm-cpufreq firefox-esr thunderbird goldendict subversion libreoffice qt5-style-plugins apt-get install -y gtk-qt-engine-trinity gtk3-tqt-engine-trinity bluebird-gtk-theme darkmint-gtk-theme fonts-noto fonts-noto-color-emoji apt-get install -y yakuake-trinity kontact-trinity kopete-trinity basket-trinity karm-trinity tdesvn-trinity kbabel-trinity dpkg-sig apt-utils #Conditional packages instalation if test -f usr/lib/gkrellm2/plugins/radio.so; then apt-get install -y gkrellm-radio gkrellm-volume fi if test -f etc/tvtime/tvtime.xml; then apt-get install -y tvtime; fi if test -f etc/proftpd/proftpd.conf; then apt-get install -y proftpd-basic proftpd-mod-vroot; fi if test -d usr/share/live; then apt-get install -y live-build syslinux; fi apt-get clean else install -d $targ/etc/ fi exit 1 # Configuration ## etc/{passwd,group,shadow} get manually for specific users cp -P etc/{modules,locale.gen} $targ/etc/ cp -P usr/local/bin/* $targ/usr/local/bin/ install -d $targ/etc/modprobe.d/; cp -P etc/modprobe.d/bttv.conf $targ/etc/modprobe.d/ install -d $targ/etc/default/; cp -P etc/default/{locale,keyboard,grub} $targ/etc/default/ install -d $targ/etc/security/; cp -P etc/security/limits.conf $targ/etc/security/ install -d $targ/etc/ssh/; cp -P etc/ssh/* $targ/etc/ssh/ install -d $targ/etc/NetworkManager/; cp -PR etc/NetworkManager/{NetworkManager.conf,system-connections} $targ/etc/NetworkManager/ install -d $targ/etc/X11/; cp -PR etc/X11/{xorg.conf,xorg.conf.d,default-display-manager} $targ/etc/X11/ install -d $targ/etc/trinity/; cp -PR etc/trinity/tdm $targ/etc/trinity/ install -d $targ/etc/cups/; cp -PR etc/cups $targ/etc/ if test -f etc/proftpd/proftpd.conf; then install -d $targ/etc/proftpd/; cp -PR etc/proftpd $targ/etc/ fi install -d $targ/usr/share/icons; cp -PR usr/share/icons/{Golden3D,Silver3D,default} $targ/usr/share/icons cp -PR usr/share/stardict $targ/usr/share if test -f etc/tvtime/tvtime.xml; then install -d $targ/etc/tvtime/; cp -P etc/tvtime/tvtime.xml $targ/etc/tvtime/; fi cp --preserve=all -R opt/forticlient-sslvpn $targ/opt/ if test $isCurSys = 1; then locale-gen grub-mkconfig > $targ/boot/grub/grub.cfg plymouth-set-default-theme lines --rebuild-initrd fi # ROOT install -d $targ/root/.config cp --preserve=all -R root/{.bashrc,.bash_history,.ssh,.gnupg} $targ/root ln -s /home/roman/.Xauthority $targ/root/.Xauthority cp --preserve=all -R root/.config/mc $targ/root/.config # ROMAN install -d $targ/home/roman/.config cp --preserve=all -R home/roman/{.bashrc,.profile,.bash_history,.smb,.gtkrc-2.0-*,.fctsslvpnhistory,.gkrellm2,.ssh,.gnupg,.trinity,.thunderbird,.goldendict,.subversion,.icedove,.ViberPC,.android,Android,tmp} $targ/home/roman cp --preserve=all -R home/roman/.config/{QtProject.conf,Trolltech.conf,pulse,gtk-3.0,VirtualBox,mc,chromium,skypeforlinux,libreoffice} $targ/home/roman/.config cp --preserve=all -R home/roman/{ext,media,.tvtime,Стільниця,.openscada} $targ/home/roman install -d $targ/home/roman/.local/share; cp --preserve=all -R home/roman/.local/share/keyrings $targ/home/roman/.local/share # Other users cp --preserve=all -R home/{natali,larusa} $targ/home/ # Finish cp -P etc/cron.d/oscada_work $targ/etc/cron.d/