Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:AndnoVember:Live:15.5
kde-mini-live
config.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File config.sh of Package kde-mini-live
#!/bin/bash #================ # FILE : config.sh #---------------- # PROJECT : OpenSuSE KIWI Image System # COPYRIGHT : (c) 2006,2007,2008 SUSE LINUX Products GmbH. All rights reserved # : # AUTHOR : Marcus Schaefer <ms@suse.de>, Stephan Kulow <coolo@suse.de>, Fabian Vogt <fvogt@suse.com> # : # LICENSE : BSD #====================================== # Functions... #-------------------------------------- test -f /.kconfig && . /.kconfig test -f /.profile && . /.profile set -euox pipefail exec | tee /var/log/config.log exec 2>&1 #-------------------------------------- # Set a user environment variables _USER=linux _HOME=/home/linux _GROUP=users #-------------------------------------- # enable and disable services for i in langset NetworkManager firewalld spice-vdagentd; do systemctl -f enable $i done for i in sshd cron wicked purge-kernels; do systemctl -f disable $i done cd / # Import keys for installation touch /installkey.gpg gpg --batch --homedir /root/.gnupg --no-default-keyring --ignore-time-conflict --ignore-valid-from --keyring /installkey.gpg --import /usr/lib/rpm/gnupg/keys/* mkdir -p /pubkeys for i in /usr/lib/rpm/gnupg/keys/*.asc ; do rpm --import $i || true ln -sf "$i" "/pubkeys/${i##*/}.key" done for i in /rpmkeys/*.key ; do rpm --import $i || true done rm -rf /rpmkeys #zypper in --no-recommends -d ffmpeg-4 lame gstreamer-plugins-libav \ #gstreamer-plugins-bad-codecs gstreamer-plugins-good-extra \ #gstreamer-plugins-ugly gstreamer-plugins-ugly-codecs libavdevice57 \ #libmatroska7 # libdvdcss2 vlc-codecs #cd /var/cache/zypp/ #tar cJvf ./packman-`date +%Y%m%d`-lp155.x86_64.tar.xz packages/ if [ $(arch) == x86_64 ]; then zypper --no-remote --no-gpg-checks -n in $(find /packages/ -name '*.rpm') fi rm -rf /packages # Craft license.tar.gz used by YaST (cd /usr/share/licenses/openSUSE-release; tar -cvzf /license.tar.gz *) # Remove netronome firmware (part of kernel-firmware): this sums up to 125MB # Save 50 MiB by removing this, not very useful for lives rm -rf /lib/firmware/{liquidio,netronome,qed,mrvl,mellanox,qcom,cypress,dpaa2,bnx2x,cxgb4} # Remove some large locales to save space find /usr/lib/locale/* -maxdepth 0 -type d -not -name 'C' -not -name 'en_US*' -not -name 'ru_RU*' | xargs rm -rf find /usr/share/locale/* -maxdepth 0 -type d -not -name 'ru' -not -name 'ru_RU' -not -name 'kf5' | xargs rm -rf find /usr/share/locale/kf5/* -maxdepth 0 -type d -not -name 'ru' -not -name 'ru_RU' | xargs rm -rf find /usr/share/help/* -maxdepth 0 -type d -not -name 'C' -not -name 'ru' -not -name 'ru_RU' | xargs rm -rf find /usr/share/qt5/translations/qtwebengine_locales/ -type f -not -name 'en-US.pak' -not -name 'ru.pak' | xargs rm -f #find /usr/lib*/firefox/browser/extensions/ -type f -not -name 'langpack-ru*' -delete find /usr/lib*/chromium/locales/ -type f -not -name 'en-US.pak' -not -name 'ru.pak' -delete # Remove duplicate licenses _target=""; fdupes -q -p -n -H -r /usr/share/licenses/ | while read _file; do if test -z "$_target" ; then _target="$_file"; else if test -z "$_file" ; then _target=""; continue ; fi ; ln -f "$_target" "$_file"; fi ; done # Some packages really exaggerate here rm -rf /usr/share/doc/ghostscript/* rm -rf /usr/share/doc/packages/* # Not needed rm -f /boot/vmlinux*.[gx]z # Decompress kernel modules, better for squashfs (boo#1192457) find /lib/modules/*/kernel -name '*.ko.zst' -exec zstd --rm -d {} + for kernel_version in $(basename -a /lib/modules/*) ; do depmod $kernel_version done # Add repos from /etc/YaST2/control.xml releasever="$(grep ^PRETTY_NAME /etc/os-release | cut -f2 -d\" | cut -f3 -d\ )" # Repository named '?' already exists grep -h 'name\|enabled' /etc/zypp/repos.d/*.repo for repo in $(grep -oh '\[.*\]' /etc/zypp/repos.d/*.repo | tr -d \[\]) ; do sed -i "/>$repo</{n;n;s/true/false/}" /etc/YaST2/control.xml done eval $(xsltproc /geturls.xsl /etc/YaST2/control.xml) rm /geturls.xsl release="$(grep ^PRETTY_NAME /etc/os-release | cut -f2 -d\" | cut -f2,3 -d\ )" zypper ar -f -n "Packman-${release// /-}" http://ftp.fau.de/packman/suse/openSUSE_${release// /_}/ packman zypper ar -f -n "libdvdcss-${release// /-}" http://opensuse-guide.org/repo/openSUSE_${release// /_}/ libdvdcss #====================================== # /etc/sudoers hack to fix #297695 # (Installation Live CD: no need to ask for password of root) #-------------------------------------- sed -i -e "s/ALL\tALL=(ALL) ALL/ALL ALL=(ALL) NOPASSWD: ALL/" /etc/sudoers chmod 0440 /etc/sudoers /usr/sbin/useradd -m -u 1000 $_USER -c "Live-CD User" -p "" # mkpasswd -m sha-512 -S `pwgen -s1n 16` # mkpasswd -m help #/usr/sbin/useradd -m -u 1000 $_USER -c "Live-CD User" -p '$6$HnhRgXpb85os1xnv$/q9lyggzwlfNtm4rNPvTXBmMqxgisXLA1RaV.MBMoghv318itvttO7F2rg3A1P/Gs1g5pmhAFTGhke1Fp66v.0' #/usr/sbin/usermod -p '$6$lN2kEqjPYu9JF0wW$E1rOwqyQR3D9kcOAMAv6QO6sLPsMbaH5fqnkEuZKPUNR.AQ/tsJMiUs0MDSdI.w5wHcl2s.iJPIDXpsG.t7W/.' root # delete passwords passwd -d root passwd -d $_USER # empty password is ok pam-config -a --nullok : > /var/log/zypper.log # Add Installation and upgrade icons to the desktop cp /usr/share/applications/{installation,upgrade}.desktop /usr/share/kio_desktop/DesktopLinks/ chmod a+x /usr/share/kio_desktop/DesktopLinks/{installation,upgrade}.desktop #chown -R $_USER:$_GROUP $_HOME chkstat --system --set ln -s /usr/lib/systemd/system/graphical.target /etc/systemd/system/default.target baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER_AUTOLOGIN $_USER baseUpdateSysConfig /etc/sysconfig/keyboard KEYTABLE us.map.gz baseUpdateSysConfig /etc/sysconfig/keyboard YAST_KEYBOARD "english-us,pc104" baseUpdateSysConfig /etc/sysconfig/keyboard COMPOSETABLE "clear latin1.add" baseUpdateSysConfig /etc/sysconfig/language RC_LANG "" baseUpdateSysConfig /etc/sysconfig/console CONSOLE_FONT "eurlatgr.psfu" baseUpdateSysConfig /etc/sysconfig/console CONSOLE_SCREENMAP trivial baseUpdateSysConfig /etc/sysconfig/console CONSOLE_MAGIC "(K" baseUpdateSysConfig /etc/sysconfig/console CONSOLE_ENCODING "UTF-8" baseUpdateSysConfig /etc/sysconfig/windowmanager X_MOUSE_CURSOR Breeze_Snow echo -e '\nXCURSOR_THEME=Breeze_Snow' >> /etc/environment baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER sddm baseUpdateSysConfig /etc/sysconfig/windowmanager DEFAULT_WM plasma5 plymouth-set-default-theme breeze #Disable journal write to disk in live mode, bug 950999 echo "Storage=volatile" >> /etc/systemd/journald.conf # Remove generated files (boo#1098535) rm -rf /var/cache/zypp/* /var/lib/zypp/AnonymousUniqueId /var/lib/systemd/random-seed #======================================>% echo -e '\nexport QT_QPA_PLATFORMTHEME="KDE"' >> /etc/environment _a1='org.kde.kontact.desktop' _a10='chromium-browser.desktop' _a2='org.kde.gwenview.desktop' _a3='org.kde.okular.desktop' _a4='writer.desktop' _a5='org.kde.dolphin.desktop' _a6='systemsettings.desktop' _a7='org.kde.khelpcenter.desktop' _a8='org.kde.konsole.desktop' _a9='org.kde.kate.desktop' _a0='</default>' sed -i~ "/preferred:/s|browser,.*|browser,$_a1,$_a10,$_a2,$_a3,$_a4,$_a5,$_a6,$_a7,$_a8,$_a9,$_a0|" \ /usr/share/plasma/plasmoids/org.kde.plasma.kick*/contents/config/main.xml mv /etc/xdg/kickoffrc /etc/xdg/kickoffrc~ #_b1='file:///usr/share/applications/' #_c1='firefox.desktop' #_c2='org.kde.dolphin.desktop' #_c3='org.kde.konsole.desktop' #_d1='?wmClass=' #_e1='Firefox' #_e2='dolphin' #_e3='konsole' #sed -i~ "76s|<default><|<default>$_b1$_c1$_d1$_e1,$_b1$_c2$_d1$_e2,$_b1$_c3$_d1$_e3<|" \ # /usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/config/main.xml sed -i~ "s/applications:.*desktop,/applications:org.kde.konsole.desktop,applications:chromium-browser.desktop,/" \ /usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/config/main.xml sed -i "/launchers/{n;n;s|,preferred://browser||}" \ /usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/config/main.xml if [ -f /etc/xdg/kcminputrc ]; then sed -i 's/\(cursorTheme=\).*/\1Breeze_Snow/' /etc/xdg/kcminputrc fi if [ -f /usr/lib/sddm/sddm.conf.d/10-theme.conf ]; then sed -i 's/\(CursorTheme=\).*/\1Breeze_Snow/' /usr/lib/sddm/sddm.conf.d/10-theme.conf fi sed -i '/ColorScheme/s/Breeze.*/BreezeDark/' /usr/share/plasma/look-and-feel/org.openSUSE.desktop/contents/defaults sed -i '/Icons/{n;s/breeze.*/breeze-dark/}' /usr/share/plasma/look-and-feel/org.openSUSE.desktop/contents/defaults sed -i '/cursorTheme/s/breeze_cursors/Breeze_Snow/' /usr/share/plasma/look-and-feel/org.openSUSE.desktop/contents/defaults if [ -d "/etc/icewm/" ]; then cat > /etc/icewm/theme <<- EOF Theme="metal2/default.theme" EOF sed -i -e 's/\#\ ConfirmLogout=1/ConfirmLogout=0/' \ -e 's/\#\ MenuMouseTracking=0/MenuMouseTracking=1/' \ -e 's/\#\ PagerShowPreview=0/PagerShowPreview=1/' \ -e 's/\#\ TimeFormat=\"%X\"/TimeFormat=\"%R\"/' \ -e 's/\#\ TrayDrawBevel=0/TrayDrawBevel=1/' \ /etc/icewm/prefoverride if grep 'KeyboardLayouts=' /etc/icewm/prefoverride ; then sed -i 's/\#\ \(KeyboardLayouts=\).*$/\1\"en\", \"ru\"/' /etc/icewm/prefoverride else echo 'KeyboardLayouts="en", "ru"' >> /etc/icewm/prefoverride fi sed -i '/^#/!s/^/#/;/xterm/s/^#//;/separator/s/^#//' /etc/icewm/menu sed -i '/SUSE/s/^#//' /etc/icewm/menu #echo 'includeprog xdg_menu --format icewm' >> /etc/icewm/menu #echo -e 'xdg_menu --format icewm &' >> /etc/icewm/startup fi cat >> /etc/X11/Xresources <<-EOF xterm*faceName: Monospace:size=10 xterm*rightScrollBar: true EOF mkdir -p /etc/zypp/vendors.d cat > /etc/zypp/vendors.d/packman <<-EOF [main] vendors = openSUSE,http://packman.links2linux.de EOF #======================================>%
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor