summarylogtreecommitdiffstats
path: root/mkinitcpio-netconf.install
blob: cb105426f56491b34a7b27df6985f4524774213b (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
#!/bin/bash

post_install() {
    cat<<INSTALLEOF
    This hook will parse the ip= kernel command line variable and configure any
    interfaces specified using ipconfig found in the mkinitcpio-nfs-utils package.
    It is meant to be used alongside other hooks that need early userspace networking
    such as, mkinitcpio-dropbear. There is also an optional netconf_timeout kernel
    command line argument that can be used when obtaining the ip address using dhcp, so
    that ipconfig will not hang forever waiting for an IP addres. You can nest multiple ip=
    parameters inside a single ip= parameter, separated by : to configure multiple interfaces.
    There is no limit on the number of interfaces configured, but the kernel cmdline size.
    To use this hook add the netconf hook before any other hook that need networking in
    "/etc/mkinitcpio.conf" and rebuild the initramfs.
INSTALLEOF
}

post_remove() {
    cat<<REMOVEEOF
    Remove the "netconf" from the "HOOKS" section in "/etc/mkinitcpio.conf"
    and rebuild the initramfs. Also, remove the ip= cmdline parameter and regenerate
    your bootloader configuration.
REMOVEEOF
}

post_upgrade() {
    cat<<UPGRADEEOF
    There is now an optional kernel command line parameter named netconf_timeout that
    is used to pass the timeout option to ipconfig. This is means that when using
    ip=dhcp as a kernel command line parameter, ipconfig will not hang forever if the
    dhcp server is unavailable.

    You can also now nest multiple ip= parameters inside a single ip= parameter,
    separated by : to configure multiple interfaces. There is no limit on the number
    of interfaces configured, but the kernel cmdline size.
UPGRADEEOF
}