Debian Codegraph @

src/res/configlets/dd-wrt-jffs/check_utilities

raw
1 ## -*- mode: shell-script; -*-
2 ##
3 ## To be able to make changes to the part of configuration created
4 ## from this configlet you need to copy this file to the directory
5 ## fwbuilder/configlets/linux24/ in your home directory and modify it.
6 ## Double "##" comments are removed during processing but single "#"
7 ## comments are be retained and appear in the generated script. Empty
8 ## lines are removed as well.
9 ##
10 ## Configlets support simple macro language with these constructs:
11 ## {{$var}} is variable expansion
12 ## {{if var}} is conditional operator.
13 ##
14 ## Known variables:
15 ##
16 ## need_iptables_restore
17 ## need_ip6tables_restore
18 ## need_modprobe : set to true if "load modules" option is on, or
19 ## script needs to manage vlan or bonding interfaces.
20 ## See configlets for vlan and bonding interfaces to find
21 ## how modprobe is used to load corresponding modules
22 ## need_vconfig : set to true if script manages vlans
23 ## need_brctl : set to true if script manages bridge ports
24 ## need_ifenslave : set to true if script manages bonding interfaces
25 ## need_ipset : set to true if ipset is used for run-time address tables
26 ## load_modules : set to true if "load modules" option is on
27 ##
28 ## These variables are set in OSConfigurator_linux24::printShellFunctions()
29 ## About using "command" to find programs:
30 ##
31
32 find_program() {
33 PGM=$1
34 which $PGM >/dev/null 2>&1 || {
35 echo "\"$PGM\" not found"
36 exit 1
37 }
38 }
39
40 check_tools() {
41 find_program which
42 find_program $IPTABLES
43 {{if need_iptables_restore}} find_program $IPTABLES_RESTORE{{endif}}
44 {{if need_ip6tables_restore}} find_program $IP6TABLES_RESTORE{{endif}}
45 find_program $IP
46 {{if need_vconfig}} find_program $VCONFIG {{endif}}
47 {{if need_brctl}} find_program $BRCTL {{endif}}
48 {{if need_ifenslave}} find_program $IFENSLAVE {{endif}}
49 {{if need_ipset}} find_program $IPSET {{endif}}
50 }
51