installer: Rework downloading ISO and allow using a custom URL
[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
21 inst /usr/local/bin/iowrap
22
23 # Kernel drivers
24 instmods =drivers/hid
25
26 # Network drivers
27 instmods =drivers/net/ethernet =drivers/net/usb
28 instmods virtio_net hv_netvsc vmxnet3
29
30 # Filesystem support
70a44b52
MT
31 inst_multiple parted mkswap mke2fs mkreiserfs mkfs.xfs
32 instmods ext4 iso9660 reiserfs vfat xfs
5fca8d27
MT
33
34 # Extraction
35 inst_multiple tar gzip lzma xz
36
7d114284 37 # Networking
c0511f3a 38 inst_multiple dhcpcd ethtool hostname ip ping sort wget
7d114284 39 inst /usr/bin/start-networking.sh
5fca8d27 40 inst /var/ipfire/dhcpc/dhcpcd.conf
c0511f3a 41 inst /var/ipfire/dhcpc/dhcpcd-run-hooks
5fca8d27
MT
42 inst "$moddir/70-dhcpcd.exe" "/var/ipfire/dhcpc/dhcpcd-hooks/70-dhcpcd.exe"
43
c0511f3a
MT
44 inst /etc/host.conf /etc/hosts /etc/protocols
45 inst /etc/nsswitch.conf /etc/resolv.conf
46 inst_libdir_file "libnss_dns.so.*"
47
5fca8d27 48 # Misc. tools
c0511f3a 49 inst_multiple cut grep eject id killall md5sum touch
3f1c7eeb 50 inst_multiple -o fdisk cfdisk df ps top
5fca8d27
MT
51
52 # Hardware IDs
53 inst /usr/share/hwdata/pci.ids /usr/share/hwdata/usb.ids
54
55 # Locales
56 for locale in de en es fr nl pl ru tr; do
57 for file in $(find /usr/lib/locale/${locale}*); do
58 inst "${file}"
59 done
60 done
37f3421a
MT
61 for file in /usr/share/locale/*/LC_MESSAGES/installer.mo; do
62 inst "${file}"
63 done
5fca8d27 64
5315fae6
MT
65 # Bash start files
66 inst_multiple /etc/profile /root/.bash_profile /etc/bashrc /root/.bashrc
02d3ebbd
MT
67 for file in /etc/profile.d/*.sh; do
68 inst "${file}"
69 done
5315fae6 70
5fca8d27
MT
71 inst_hook cmdline 99 "$moddir/fake-root.sh"
72 inst_hook pre-mount 99 "$moddir/run-installer.sh"
73
74 return 0
75}