tsysconf - libdevuansdk - common library for devuan's simple distro kits
HTML git clone https://git.parazyd.org/libdevuansdk
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
tsysconf (2770B)
---
1 #!/usr/bin/env zsh
2 # Copyright (c) 2016-2021 Ivan J. <parazyd@dyne.org>
3 # This file is part of libdevuansdk
4 #
5 # This source code is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This software is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this source code. If not, see <http://www.gnu.org/licenses/>.
17
18 ## default system configurations
19
20 conf_print_debconf() {
21 fn conf_print_debconf
22
23 cat <<EOF
24 console-common console-data/keymap/policy select Select keymap from full list
25 console-common console-data/keymap/full select en-latin1-nodeadkeys
26 EOF
27 }
28
29 conf_print_fstab() {
30 fn conf_print_fstab
31 [[ -n "$livesdk_version" ]] && return
32 cat <<EOF
33 #<file system> <mount point> <type> <options> <dump> <pass>
34 EOF
35 }
36
37 conf_print_hostname() {
38 fn conf_print_hostname
39 req=(os)
40 ckreq || return 1
41
42 print "$os"
43 }
44
45 conf_print_hosts() {
46 fn conf_print_hosts
47 req=(os)
48 ckreq || return 1
49
50 cat <<EOF
51 127.0.0.1 localhost ${os}
52 ::1 localhost
53 EOF
54 }
55
56 conf_print_netifaces() {
57 fn conf_print_netifaces
58
59 cat <<EOF
60 # interfaces(5) file used by ifup(8) and ifdown(8)
61
62 # Please note that this file is written to be used with dhcpcd
63 # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
64
65 # Include files from /etc/network/interfaces.d:
66 # source-directory /etc/network/interfaces.d
67
68 auto lo
69 iface lo inet loopback
70
71 allow-hotplug eth0
72 iface eth0 inet dhcp
73
74 #auto eth1
75 #iface eth1 inet dhcp
76
77 # auto eth0
78 # iface eth0 inet static
79 # address 10.0.1.10
80 # netmask 255.255.255.0
81
82 # allow-hotplug wlan0
83 # iface wlan0 inet dhcp
84 # wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
85
86 # allow-hotplug wlan1
87 # iface wlan1 inet dhcp
88 # wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
89 EOF
90 }
91
92 conf_print_resolvconf() {
93 fn conf_print_resolvconf
94
95 cat <<EOF
96 nameserver 8.8.8.8
97 nameserver 8.8.4.4
98 EOF
99 }
100
101 conf_print_sourceslist() {
102 fn conf_print_sourceslist
103 req=(mirror release section)
104 ckreq || return 1
105
106 cat <<EOF
107 # Package repositories
108 deb ${mirror} ${release} ${section}
109 deb ${mirror} ${release}-updates ${section}
110 deb ${mirror} ${release}-security ${section}
111 #deb ${mirror} ${release}-backports ${section}
112
113 # Source repositories
114 #deb-src ${mirror} ${release} ${section}
115 #deb-src ${mirror} ${release}-updates ${section}
116 #deb-src ${mirror} ${release}-security ${section}
117 #deb-src ${mirror} ${release}-backports ${section}
118 EOF
119 }