Bug 2111531 - /usr/share/os-prober/common.sh: line 328: which: command not found
Summary: /usr/share/os-prober/common.sh: line 328: which: command not found
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: os-prober
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Hedayat Vatankhah
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-27 12:56 UTC by Marcos Mello
Modified: 2022-08-06 21:09 UTC (History)
2 users (show)

Fixed In Version: os-prober-1.81-1.fc37
Clone Of:
Environment:
Last Closed: 2022-08-06 21:09:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.