Bug 2111531

Summary: /usr/share/os-prober/common.sh: line 328: which: command not found
Product: [Fedora] Fedora Reporter: Marcos Mello <marcosfrm>
Component: os-proberAssignee: Hedayat Vatankhah <hedayatv>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: agk, hedayatv
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: os-prober-1.81-1.fc37 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-06 21:09:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marcos Mello 2022-07-27 12:56:34 UTC
# grub2-mkconfig -o /etc/grub2-efi.cfg
Generating grub configuration file ...
/usr/share/os-prober/common.sh: line 328: which: command not found
Adding boot menu entry for UEFI Firmware Settings ...
done

Minimal Fedora Server install. The offending part from /usr/share/os-prober/common.sh is:

umount_exec=$(which umount)
umount() {
        if ! $umount_exec $@ 2> /dev/null; then
                error "umount error, retrying after 1 sec"
                sleep 1
                $umount_exec $@
        fi
}


I do not know how this code works. We can replace "which" with "command -v", or make os-prober RPM depend on "which", or simply call "umount" or "/bin/umount" directly perhaps?

Comment 1 Fedora Update System 2022-08-06 21:08:57 UTC
FEDORA-2022-90f3eaf5b2 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-90f3eaf5b2

Comment 2 Fedora Update System 2022-08-06 21:09:40 UTC
FEDORA-2022-90f3eaf5b2 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.