Maybe their scripts should be handling this.
I don’t have any of their hardware to test to verify things (and am not interested in any samples with the expectation of support).
If they want to update their script, they just need to download an OSMC image from Download - OSMC and adjust accordingly.
If this hardware follows the HAT specifications then these commands should not be relevant and module loading should occur on the fly. Loading modules via /etc/modules is not advised. modules.d should be used if needed.
In my oppinion argon is working well. During installation of their software they normally enable i2c using standard raspi-config commands. But osmc blocks those commands (which are standard at an raspi) and advises to use myOSMC. I do not think that that’s the job for any external script to detect modifications to standard scripts done by OSMC. raspi-config ist present as expected at a raspian system but the content is modified so that it does not work at all.
So in my opinion the problem is caused primary by OSMC. At a plain raspian system everythink works fine and without any need for manual changes by user.
There may be (or better I think there are) good reasons for OSMC to block raspi-config access. But in this case it would be a good option to enable an easy way to enable i2c within OSMC.
EDIT:
Sorry - I did not see your post at the second topic.
YES we should keep everything at one place. So lets stop here and keep Discussion - if any further discussion is required - there:
OSMC is not based on Raspbian and we don’t modify anything to remove rpi-config.
It does not exist under Debian, which OSMC is based on.
Again, we are not blocking anything. Many scripts detect the underlying operating system by checking /etc/os-release and this is standard practice. For example, Docker has provisions for different distributions, including OSMC: https://get.docker.com/.
Check if this is a forked Linux distro
check_forked() {
# Check for lsb_release command existence, it usually exists in forked distros
if command_exists lsb_release; then
# Check if the `-u` option is supported
set +e
lsb_release -a -u > /dev/null 2>&1
lsb_release_exit_code=$?
set -e
# Check if the command has exited successfully, it means we're in a forked distro
if [ "$lsb_release_exit_code" = "0" ]; then
# Print info about current distro
cat <<-EOF
You're using '$lsb_dist' version '$dist_version'.
EOF
# Get the upstream release info
lsb_dist=$(lsb_release -a -u 2>&1 | tr '[:upper:]' '[:lower:]' | grep -E 'id' | cut -d ':' -f 2 | tr -d '[:space:]')
dist_version=$(lsb_release -a -u 2>&1 | tr '[:upper:]' '[:lower:]' | grep -E 'codename' | cut -d ':' -f 2 | tr -d '[:space:]')
# Print info about upstream distro
cat <<-EOF
Upstream release is '$lsb_dist' version '$dist_version'.
EOF
else
if [ -r /etc/debian_version ] && [ "$lsb_dist" != "ubuntu" ] && [ "$lsb_dist" != "raspbian" ]; then
if [ "$lsb_dist" = "osmc" ]; then
# OSMC runs Raspbian
lsb_dist=raspbian
else
# We're Debian and don't even know it!
lsb_dist=debian
fi
dist_version="$(sed 's/\/.*//' /etc/debian_version | sed 's/\..*//')"
case "$dist_version" in
13)
dist_version="trixie"
;;
12)
dist_version="bookworm"
;;
11)
dist_version="bullseye"
;;
10)
dist_version="buster"
;;
9)
dist_version="stretch"
;;
8)
dist_version="jessie"
;;
esac
fi
fi
fi
}