Skip to content

Correct use of "ln" #35

@rubyFeedback

Description

@rubyFeedback

I just compiled kmod 32, but there appears to be an incorrect use of ln:

fi
for tool in insmod lsmod rmmod depmod modprobe modinfo; do \
        ln -s kmod /home/Programs/Kmod/32/bin/$tool; \
done
ln: failed to create symbolic link '/home/Programs/Kmod/32/bin/insmod': File exists
ln: failed to create symbolic link '/home/Programs/Kmod/32/bin/lsmod': File exists
ln: failed to create symbolic link '/home/Programs/Kmod/32/bin/rmmod': File exists
ln: failed to create symbolic link '/home/Programs/Kmod/32/bin/depmod': File exists
ln: failed to create symbolic link '/home/Programs/Kmod/32/bin/modprobe': File exists
ln: failed to create symbolic link '/home/Programs/Kmod/32/bin/modinfo': File exists
make[3]: *** [Makefile:2679: install-exec-hook] Error 1
make[2]: *** [Makefile:2553: install-exec-am] Error 2
make[1]: *** [Makefile:2439: install-am] Error 2
make: *** [Makefile:1848: install-recursive] Error 1

The symlinks are all there, all pointing at bin/kmod correctly. I think the makefile lacks
a proper "if not symlink already exists" check, so that we can skip the ~six lines or so
of ln showing that it failed to create a symbolic link (as that one is already there), so
a check "is a symlink there yet or not". Thanks for reading - this is mostly cosmetic,
but in my set of scripts to batch-compile I actually check for errors and warnings, so
removing that warning simplifies life of downstream devs a tiny bit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions