summarylogtreecommitdiffstats
path: root/wireguard_install
blob: 4438f4654182d375a7fb072812efe18cc4792c43 (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
#!/bin/bash

build()
{
    if [ ! -s /etc/wireguard/initcpio/unlock ]; then
        error "Missing Wireguard initcpio hook unlock configuration file! Exiting!"
        return 1
    else
        . /etc/wireguard/initcpio/unlock
        if [ ! -s $PRIVATE_KEYFILE ]; then
            error "Missing Wireguard initcpio hook Private Keyfile! Exiting!"
            return 1
        fi
    fi

    add_binary wg
    add_module wireguard

    add_dir /etc/wireguard/initcpio

    add_file $PRIVATE_KEYFILE
    add_file /etc/wireguard/initcpio/unlock

    add_runscript
}

help() {
    cat <<HELPME
This hook provides basic Wireguard support to assist in the remote unlocking
of encrypted partitions. There are various parameters that are to be
configured via the "/etc/wireguard/initcpio/unlock" file. This must be done!

In addition to this hook, you will require something like tinyssh or dropbear
appropriately configured in order to gain remote access. Please refer to the
Arch Wiki for further details with regards to remote unlocking of encrypted
partitions.
HELPME
}

# vim:set syntax=sh tw=78: