Skip to content

Commit 76e2081

Browse files
authored
Merge pull request #33 from tecknicaltom/skip-gpg
Don't build gpg if using LUKS passphrase
2 parents 56d346f + acb277b commit 76e2081

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

buildkernel

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1916,16 +1916,18 @@ build_static_gpg() {
19161916
emerge ${VERBOSITYFLAG} "app-crypt/staticgpg"
19171917
}
19181918
modify_initramfs() {
1919-
if [ ! -x "${GPG1PATHFROM}" ]; then
1920-
if ((ARG_ASK==1)); then
1921-
continue_yn "No static gpg found, would you like to build it?"
1922-
else
1923-
show "No static gpg found, so creating one..."
1919+
if [ -n "${LUKSKEYFILE}" ]; then
1920+
if [ ! -x "${GPG1PATHFROM}" ]; then
1921+
if ((ARG_ASK==1)); then
1922+
continue_yn "No static gpg found, would you like to build it?"
1923+
else
1924+
show "No static gpg found, so creating one..."
1925+
fi
1926+
build_static_gpg
19241927
fi
1925-
build_static_gpg
1928+
show "Copying static gpg program into initramfs..."
1929+
cp ${VERBOSITYFLAG} "${GPG1PATHFROM}" "${GPG1PATHTO}"
19261930
fi
1927-
show "Copying static gpg program into initramfs..."
1928-
cp ${VERBOSITYFLAG} "${GPG1PATHFROM}" "${GPG1PATHTO}"
19291931

19301932
if ((USINGMODULES==1)); then
19311933
show "Copying contents of ${MODPROBEDIR} directory into initramfs..."

0 commit comments

Comments
 (0)