Code:
#!/bin/sh
say_whooot () {
echo WHOOOT
}
/usr/sbin/chroot /poligon/freebsd /bin/sh -c 'say_whooot'
I 100% know why it doesn't work! I've already solved it by putting the function as string into a variable and passing it to
/bin/sh -c ...
What is the best and cleanest way to handle this?