libdevuansdk/zlibs/sysconf

120 lines
2.7 KiB
Plaintext
Raw Permalink Normal View History

2016-09-29 19:22:00 +00:00
#!/usr/bin/env zsh
2020-12-23 08:10:47 +00:00
# Copyright (c) 2016-2021 Ivan J. <parazyd@dyne.org>
2016-09-29 19:22:00 +00:00
# This file is part of libdevuansdk
#
# This source code is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this source code. If not, see <http://www.gnu.org/licenses/>.
## default system configurations
conf_print_debconf() {
fn conf_print_debconf
2016-10-10 20:15:24 +00:00
cat <<EOF
2016-09-29 19:22:00 +00:00
console-common console-data/keymap/policy select Select keymap from full list
console-common console-data/keymap/full select en-latin1-nodeadkeys
EOF
}
conf_print_fstab() {
fn conf_print_fstab
2017-12-16 19:35:23 +00:00
[[ -n "$livesdk_version" ]] && return
2016-10-10 20:15:24 +00:00
cat <<EOF
2016-09-29 19:22:00 +00:00
#<file system> <mount point> <type> <options> <dump> <pass>
EOF
}
conf_print_hostname() {
fn conf_print_hostname
req=(os)
ckreq || return 1
2020-03-12 09:13:11 +00:00
print "$os"
2016-09-29 19:22:00 +00:00
}
conf_print_hosts() {
fn conf_print_hosts
req=(os)
ckreq || return 1
2016-10-10 20:15:24 +00:00
cat <<EOF
2020-03-12 09:13:11 +00:00
127.0.0.1 localhost ${os}
::1 localhost
2016-09-29 19:22:00 +00:00
EOF
}
conf_print_netifaces() {
fn conf_print_netifaces
2016-09-29 19:22:00 +00:00
2016-10-10 20:15:24 +00:00
cat <<EOF
2016-09-29 19:22:00 +00:00
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
2017-03-18 20:30:58 +00:00
# source-directory /etc/network/interfaces.d
2016-09-29 19:22:00 +00:00
auto lo
iface lo inet loopback
2019-11-01 15:17:13 +00:00
allow-hotplug eth0
2016-09-29 19:22:00 +00:00
iface eth0 inet dhcp
2017-02-14 16:23:23 +00:00
#auto eth1
#iface eth1 inet dhcp
2016-09-29 19:22:00 +00:00
# auto eth0
# iface eth0 inet static
# address 10.0.1.10
# netmask 255.255.255.0
# allow-hotplug wlan0
2017-10-27 18:07:36 +00:00
# iface wlan0 inet dhcp
2016-09-29 19:22:00 +00:00
# wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
# allow-hotplug wlan1
2017-10-27 18:07:36 +00:00
# iface wlan1 inet dhcp
2016-09-29 19:22:00 +00:00
# wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
EOF
}
conf_print_resolvconf() {
fn conf_print_resolvconf
2016-10-10 20:15:24 +00:00
cat <<EOF
2016-09-29 19:22:00 +00:00
nameserver 8.8.8.8
nameserver 8.8.4.4
EOF
}
conf_print_sourceslist() {
fn conf_print_sourceslist
req=(mirror release section)
ckreq || return 1
2016-10-10 20:15:24 +00:00
cat <<EOF
# Package repositories
2016-09-29 19:22:00 +00:00
deb ${mirror} ${release} ${section}
deb ${mirror} ${release}-updates ${section}
deb ${mirror} ${release}-security ${section}
2017-01-30 15:32:07 +00:00
#deb ${mirror} ${release}-backports ${section}
2016-09-29 19:22:00 +00:00
# Source repositories
2016-10-10 17:54:19 +00:00
#deb-src ${mirror} ${release} ${section}
#deb-src ${mirror} ${release}-updates ${section}
#deb-src ${mirror} ${release}-security ${section}
2017-01-30 15:32:07 +00:00
#deb-src ${mirror} ${release}-backports ${section}
2016-09-29 19:22:00 +00:00
EOF
}