-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathconfig.sh
More file actions
97 lines (72 loc) · 2.95 KB
/
config.sh
File metadata and controls
97 lines (72 loc) · 2.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/bin/bash
#================
# FILE : config.sh
#----------------
# PROJECT : openSUSE KIWI Image System
# COPYRIGHT : (c) 2006,2007,2008,2017 SUSE Linux 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
#--------------------------------------
# enable and disable services
for i in NetworkManager tlp tlp-sleep avahi-dnsconfd; do
systemctl -f enable $i
done
for i in purge-kernels sshd wicked auditd apparmor; do
systemctl -f disable $i
done
cd /
rm -rf /var/cache/zypp/raw/*
#======================================
# /etc/sudoers hack to fix #297695
# (Installation Live CD: no need to ask for password of root)
#--------------------------------------
sed -i -e "s/ALL ALL=(ALL) ALL/ALL ALL=(ALL) NOPASSWD: ALL/" /etc/sudoers
chmod 0440 /etc/sudoers
/usr/sbin/useradd -m -u 999 linux -c "To Hodl or not to Hodl" -p ""
# delete passwords
passwd -d linux
passwd -d root
# empty password is ok
pam-config -a --nullok
: > /var/log/zypper.log
chown -R linux:users /home/linux
chkstat --system --set
rm -rf /var/cache/zypp/packages
# bug 544314, we only want to disable the bit in common-auth-pc
sed -i -e 's,^\(.*pam_gnome_keyring.so.*\),#\1,' /etc/pam.d/common-auth-pc
ln -s /usr/lib/systemd/system/runlevel5.target /etc/systemd/system/default.target
baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER_AUTOLOGIN linux
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 "en_US.UTF-8"
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/displaymanager DISPLAYMANAGER lightdm
###baseUpdateSysConfig /etc/sysconfig/windowmanager DEFAULT_WM gnome
#Disable journal write to disk in live mode, bug 950999
echo "Storage=volatile" >> /etc/systemd/journald.conf
#======================================
# PirateOS
#--------------------------------------
rm -R /etc/skel/bin
rm /usr/share/fonts/truetype/Ubuntu-M.ttf
rm /usr/share/fonts/truetype/Ubuntu-MI.ttf
## Fix gvfs-trash functionality for live session user
mkdir /.Trash-999
chown 999:users /.Trash-999
chmod 700 /.Trash-999
# Specific to XFCE
#--------------------------------------
rm /usr/share/wallpapers/xfce/default.wallpaper
ln -s /usr/share/wallpapers/wallpaper1.png /usr/share/wallpapers/xfce/default.wallpaper