Altera_Forum
Honored Contributor
20 years agoshell scripts
I want to run a shell script. When I try to start it, I get message
# ./scull_load
./scull_load: not found # ls -l
-rwxr-xr-x 1 root root 1975 Jan 1 1970 scull_load this is the script #!/bin/sh
module="samirainterface"
device="kpipe"
mode="664"
# invoke insmod with all arguments we got# and use a pathname, as insmod doesn't look in . by default
busybox insmod ./$module.ko $* || exit 1# retrieve major number
major=$(awk "\$2==\"$module\" {print \$1}" /proc/devices)
# Remove stale nodes and replace them, then give gid and perms# Usually the script is shorter, it's scull that has several devices in it.
rm -f /dev/${device}pipe
mknod /dev/${device}0 c $major 0
ln -sf ${device}0 /dev/${device}
chmod $mode /dev/${device}0 Why doesn't find ths shell this script?