summaryrefslogtreecommitdiff
path: root/repo/xi/sysconfigs.xibuild
blob: a75655e32344e581613032d8727d719bb1d78aa0 (plain)
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
#!/bin/sh

MAKEDEPS=""
DEPS="bootscripts sh"

PKG_VER=N/A
DESC="Default system configs for xilinux"

package () {
    mkdir -pv $PKG_DEST/etc/
    mkdir -pv $PKG_DEST/etc/sysconfig
    cat > $PKG_DEST/etc/sysconfig/rc.site << "EOF"
# rc.site

# Distro Information
DISTRO="xilinux" # The distro name
DISTRO_CONTACT="xi@davidovski.xyz" # Bug report address
DISTRO_MINI="xi" # Short name used in filenames for distro config

# Define custom colors used in messages printed to the screen

# Please consult `man console_codes` for more information
# under the "ECMA-48 Set Graphics Rendition" section
#
# Warning: when switching from a 8bit to a 9bit font,
# the linux console will reinterpret the bold (1;) to
# the top 256 glyphs of the 9bit font.  This does
# not affect framebuffer consoles

BRACKET="\\033[1;34m" # Blue
FAILURE="\\033[1;31m" # Red
INFO="\\033[1;36m"    # Cyan
NORMAL="\\033[0;39m"  # Grey
SUCCESS="\\033[1;32m" # Green
WARNING="\\033[1;33m" # Yellow

# Use a colored prefix
BMPREFIX="      "
SUCCESS_PREFIX="${SUCCESS}  *  ${NORMAL} "
FAILURE_PREFIX="${FAILURE}*****${NORMAL} "
WARNING_PREFIX="${WARNING} *** ${NORMAL} "

# Manually seet the right edge of message output (characters)
# Useful when resetting console font during boot to override
# automatic screen width detection
#COLUMNS=120

# Interactive startup
#IPROMPT="yes" # Whether to display the interactive boot prompt
#itime="3"    # The amount of time (in seconds) to display the prompt

# The total length of the distro welcome string, without escape codes
wlen=$(echo "Welcome to ${DISTRO}" | wc -c )
welcome_message="Welcome to ${INFO}${DISTRO}${NORMAL}"

# The total length of the interactive string, without escape codes
#ilen=$(echo "Press 'I' to enter interactive startup" | wc -c )
#i_message="Press '${FAILURE}I${NORMAL}' to enter interactive startup"

# Set scripts to skip the file system check on reboot
#FASTBOOT=yes

# Skip reading from the console
#HEADLESS=yes

# Write out fsck progress if yes
#VERBOSE_FSCK=no

# Speed up boot without waiting for settle in udev
#OMIT_UDEV_SETTLE=y

# Speed up boot without waiting for settle in udev_retry
#OMIT_UDEV_RETRY_SETTLE=yes

# Skip cleaning /tmp if yes
#SKIPTMPCLEAN=no

# For setclock
UTC=1
#CLOCKPARAMS=

# For consolelog (Note that the default, 7=debug, is noisy)
#LOGLEVEL=7

# For network
HOSTNAME=xi

# Delay between TERM and KILL signals at shutdown
#KILLDELAY=3

# Optional sysklogd parameters
SYSKLOGD_PARMS="-m 0"

# Console parameters
UNICODE=1
KEYMAP="us"
FONT="lat0-16 -m 8859-15"
EOF


    cat > $PKG_DEST/etc/profile << "EOF"

umask 022

PS1="\u@\h \w $ "
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/.local/bin

export PATH
export PS1

# Termcap is outdated, old, and crusty, kill it.
unset TERMCAP

# Man is much better than us at figuring this out
unset MANPATH
export QT_QPA_PLATFORMTHEME=qt5ct
EOF

    cat > $PKG_DEST/etc/inputrc << "EOF"
# Begin /etc/inputrc
# Modified by Chris Lynn <roryo@roryo.dynup.net>

# Allow the command prompt to wrap to the next line
set horizontal-scroll-mode Off

# Enable 8bit input
set meta-flag On
set input-meta On

# Turns off 8th bit stripping
set convert-meta Off

# Keep the 8th bit for display
set output-meta On

# none, visible or audible
set bell-style none

# All of the following map the escape sequence of the value
# contained in the 1st argument to the readline specific functions
"\eOd": backward-word
"\eOc": forward-word

# for linux console
"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[5~": beginning-of-history
"\e[6~": end-of-history
"\e[3~": delete-char
"\e[2~": quoted-insert

# for xterm
"\eOH": beginning-of-line
"\eOF": end-of-line

# for Konsole
"\e[H": beginning-of-line
"\e[F": end-of-line

# End /etc/inputrc
EOF
    cat > $PKG_DEST/etc/shells << "EOF"
    /bin/sh
EOF

    cat > $PKG_DEST/etc/lsb-release << "EOF"
LSB_VERSION=1.4
DISTRIB_ID="xilinux"
DISTRIB_RELEASE=rolling
DISTRIB_DESCRIPTION="Xi Linux"
EOF

    cat > $PKG_DEST/etc/lsb-release << "EOF"
LSB_VERSION=1.4
DISTRIB_ID=xi
DISTRIB_RELEASE=rolling
DISTRIB_DESCRIPTION="XiLinux"
EOF
    cat > $PKG_DEST/etc/os-release << "EOF"
NAME="xilinux"
PRETTY_NAME="XiLinux"
ID=xi
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://xi.davidovski.xyz"
DOCUMENTATION_URL="https://xi.davidovski.xyz"
SUPPORT_URL="https://xi.davidovski.xyz"
BUG_REPORT_URL="https://xi.davidovski.xyz"
LOGO=xilinux-logo

EOF


}