summarylogtreecommitdiffstats
path: root/install-tools
blob: 4d46a835c8c3fab185b5cb4ea81504046b8b34f6 (plain)
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
44
45
46
47
48
#!/bin/bash

build() {
    local fs bin hook

    for fs in ext2 ext3 ext4 btrfs; do
        [[ -f /usr/bin/mkfs.$fs ]] && add_binary mkfs.$fs
    done

    [[ -e /etc/mke2fs.conf ]] && add_file /etc/mke2fs.conf

    for bin in /usr/bin/btrfs*; do
        [[ -f $bin ]] && add_binary "$bin"
    done

    add_binary dhcpcd
    add_file /usr/lib/dhcpcd/dhcpcd-run-hooks
    add_file /etc/dhcpcd.conf
    add_dir /var/lib/dhcpcd
    for hook in /usr/lib/dhcpcd/dhcpcd-hooks/*; do
        [[ -f "$hook" ]] && add_file "$hook"
    done

    add_file /etc/ssl/certs/ca-certificates.crt
    add_file /etc/ssl/cert.pem

    add_binary wget
    add_file /etc/wgetrc
    for bin in /usr/lib/libnss_dns* /usr/lib/libnss_files* /usr/lib/libnss_mymachines* /usr/lib/libnss_resolv* ; do
	    add_binary "$bin"
    done

    add_binary curl

    add_binary host
    add_binary nslookup
    add_binary fdisk
    add_binary bash
    which strace && add_binary strace
}

help() {
    cat <<HELPEOF
This hook provides the tools to partition the disk and install a system.
HELPEOF
}

# vim: set ft=sh ts=4 sw=4 et: