Skip to content

Commit 7a30e36

Browse files
authored
fix(deps): add detection for lxc container add hostname dependency (#3350)
1 parent 5fc8953 commit 7a30e36

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

lgsm/functions/check_deps.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,15 @@ fn_deps_build_debian(){
454454
elif [ "${shortname}" == "pvr" ]; then
455455
array_deps_required+=( libc++1 )
456456
fi
457+
458+
# check if system is a lxc container and the hostname dependency.
459+
if command -v systemd-detect-virt &> /dev/null; then
460+
systemd_virt=$(systemd-detect-virt)
461+
if [ "${systemd_virt}" == "lxc" ]||[ "${systemd_virt}" == "lxc-libvirt" ]; then
462+
array_deps_required+=( hostname )
463+
fi
464+
fi
465+
457466
fn_deps_email
458467
fn_check_loop
459468
}
@@ -557,6 +566,15 @@ fn_deps_build_redhat(){
557566
elif [ "${shortname}" == "pvr" ]; then
558567
array_deps_required+=( libcxx )
559568
fi
569+
570+
# check if system is a lxc container and the hostname dependency.
571+
if command -v systemd-detect-virt &> /dev/null; then
572+
systemd_virt=$(systemd-detect-virt)
573+
if [ "${systemd_virt}" == "lxc" ]||[ "${systemd_virt}" == "lxc-libvirt" ]; then
574+
array_deps_required+=( hostname )
575+
fi
576+
fi
577+
560578
fn_deps_email
561579
fn_check_loop
562580
}

0 commit comments

Comments
 (0)