]> git.ipfire.org Git - ipfire-2.x.git/blame - src/installer/dracut-module/module-setup.sh
installer: Set the clock correctly when installing over network
[ipfire-2.x.git] / src / installer / dracut-module / module-setup.sh
CommitLineData
5fca8d27
MT
1#!/bin/bash
2# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
3# ex: ts=8 sw=4 sts=4 et filetype=sh
4
5# called by dracut
6check() {
7 return 255
8}
9
10# called by dracut
11depends() {
12 echo base bash mdraid shutdown
13 return 0
14}
15
16# called by dracut
17install() {
5315fae6 18 inst /etc/system-release
5fca8d27
MT
19 inst /usr/bin/installer
20 inst /usr/bin/downloadsource.sh
681c9bbe 21 inst /usr/bin/execute-postinstall.sh
5fca8d27
MT
22 inst /usr/local/bin/iowrap
23
24 # Kernel drivers
25 instmods =drivers/hid
26
27 # Network drivers
28 instmods =drivers/net/ethernet =drivers/net/usb
29 instmods virtio_net hv_netvsc vmxnet3
30
31 # Filesystem support
92e78233 32 inst_multiple parted mkswap mke2fs mkreiserfs mkfs.xfs mkfs.vfat
70a44b52 33 instmods ext4 iso9660 reiserfs vfat xfs
5fca8d27
MT
34
35 # Extraction
36 inst_multiple tar gzip lzma xz
37
7d114284 38 # Networking
c0511f3a 39 inst_multiple dhcpcd ethtool hostname ip ping sort wget
7d114284 40 inst /usr/bin/start-networking.sh
5fca8d27 41 inst /var/ipfire/dhcpc/dhcpcd.conf
c0511f3a 42 inst /var/ipfire/dhcpc/dhcpcd-run-hooks
5fca8d27
MT
43 inst "$moddir/70-dhcpcd.exe" "/var/ipfire/dhcpc/dhcpcd-hooks/70-dhcpcd.exe"
44
f754146b
MT
45 # CAs
46 inst /etc/ssl/cert.pem
47
69749af1 48 inst /etc/host.conf /etc/protocols
c0511f3a
MT
49 inst /etc/nsswitch.conf /etc/resolv.conf
50 inst_libdir_file "libnss_dns.so.*"
51
5fca8d27 52 # Misc. tools
5ea26096 53 inst_multiple chmod cut grep eject id killall md5sum ntpdate touch
3f1c7eeb 54 inst_multiple -o fdisk cfdisk df ps top
5fca8d27
MT
55
56 # Hardware IDs
57 inst /usr/share/hwdata/pci.ids /usr/share/hwdata/usb.ids
58
59 # Locales
7b6d7c69
MT
60 mkdir -p "${initdir}/usr/lib/locale"
61 localedef --quiet --prefix="${initdir}" --add-to-archive /usr/lib/locale/en_US
62 localedef --quiet --prefix="${initdir}" --add-to-archive /usr/lib/locale/en_US.utf8
63
37f3421a
MT
64 for file in /usr/share/locale/*/LC_MESSAGES/installer.mo; do
65 inst "${file}"
66 done
5fca8d27 67
5315fae6
MT
68 # Bash start files
69 inst_multiple /etc/profile /root/.bash_profile /etc/bashrc /root/.bashrc
02d3ebbd
MT
70 for file in /etc/profile.d/*.sh; do
71 inst "${file}"
72 done
5315fae6 73
5fca8d27
MT
74 inst_hook cmdline 99 "$moddir/fake-root.sh"
75 inst_hook pre-mount 99 "$moddir/run-installer.sh"
76
77 return 0
78}