-
Notifications
You must be signed in to change notification settings - Fork 2
/
fedora-setup
43 lines (38 loc) · 1.42 KB
/
fedora-setup
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
#!/bin/sh
#
# Fedora Linux in WSL basic configuration and installation of the basic tools.
#
# Intended to be executed immediately after a clean install, but can also be
# run later and repeated without creating trouble.
#
# Based on separate "sub-scripts" for each main action performed (documented
# below), which can also be executed separately.
#
# NOTE:
# - Written for WSL import of docker root filesystem of Fedora 33 and 34,
# from Fedora Container Base image (with dnf) and Fedora Container Minimal
# Base image (with microdnf).
# - Must be run by actual root user, not by use of sudo from regular user,
# (sudo is not installed by default in the Fedora Container Minimal Base image).
# - Interactive! Will prompt user before doing any changes!
# - Skips installation of documentation, by specifying --nodocs as command line
# argument. Standard base image has this configured as default with
# "tsflags=nodocs" in /etc/dns/dns.conf, but this is not supported by microdnf
# so for the minimal base image it must be added on command line.
#
# Verify running as root
if [ ${EUID:-$(id -u)} -ne 0 ]; then
echo 'Please run this script as root'
exit 1
fi
echo "Configuring locale..."
. "${0}-locale"
echo
echo "Configuring packages..."
. "${0}-packages"
# Note: bash-setup requires find command, which is installed by setup-packages!
echo
echo "Configuring bash shell environment"
. "$(dirname ${0})/bash-setup"
echo
echo Done