- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
bool aiccu_os_install(void)
{
/* Check if IPv6 support is available */
if (access("/proc/net/if_inet6", F_OK))
{
/* Doing the modprobe doesn't guarantee success unfortunately */
(void)system("modprobe -q ipv6 2>/dev/null >/dev/null");
/* Thus test it again */
if (access("/proc/net/if_inet6", F_OK))
{
dolog(LOG_ERR, "No IPv6 Stack found! Please check your kernel and module configuration\n");
return false;
}
}
/* Try to load modules (SIT tunnel, TUN/TAP)
* They can be kernel builtins and there is no easy
* way to check if they are loaded/built except for
* trying to use them and fail at that point
*/
(void)system("modprobe -q sit 2>/dev/null >/dev/null");
(void)system("modprobe -q tun 2>/dev/null >/dev/null");
return true;
}
Но могу ошибаться, не пробовал использовать.