Debian Codegraph @

tests/setup2/run.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 echoscip-shell system . . echo.
4 echoscip-shell system . . echo. "$0"
5 echoscip-shell system . . echo.
6
7 REAR_DIR="$(readlinkscip-shell system . . readlink. -f "$(dirnamescip-shell system . . dirname. "${BASH_SOURCE[0]}")/../..")"
8
9 RESULT_DIR="$(readlinkscip-shell system . . readlink. -f "$(dirnamescip-shell system . . dirname. "${BASH_SOURCE[0]}")")/$(basenamescip-shell system . . basename. $0 .sh)_results"
10 mkdirscip-shell system . . mkdir. -p $RESULT_DIR
11
12 function DebugPrintscip-shell shell shell-project 0.0.0 DebugPrint(). () {
13 echoscip-shell system . . echo. "DebugPrint: $*" | teescip-shell system . . tee. -a $RESULT_DIR/stderr >&2
14 }
15
16 function LogPrintscip-shell shell shell-project 0.0.0 LogPrint(). () {
17 echoscip-shell system . . echo. "LogPrint: $*" | teescip-shell system . . tee. -a $RESULT_DIR/stderr >&2
18 }
19
20 function LogPrintErrorscip-shell shell shell-project 0.0.0 LogPrintError(). () {
21 echoscip-shell system . . echo. "LogPrintError: $*" | teescip-shell system . . tee. -a $RESULT_DIR/stderr >&2
22 }
23
24 function BugErrorscip-shell shell shell-project 0.0.0 BugError(). () {
25 echoscip-shell system . . echo. "BUGERROR: $*" | teescip-shell system . . tee. -a $RESULT_DIR/stderr >&2
26 }
27
28 function read_and_strip_filescip-shell shell shell-project 0.0.0 read_and_strip_file(). () {
29 grepscip-shell system . . grep. -v "^#" $1 2>/dev/nullscip-shell filesystem . . `/dev/null`. || truescip-shell system . . true.
30 }
31
32 function is_truescip-shell shell shell-project 0.0.0 is_true(). () {
33 if [scip-shell system . . `[`. "$1" == "true" ]; then
34 return 0
35 else
36 return 1
37 fi
38 }
39
40 function has_binaryscip-shell shell shell-project 0.0.0 has_binary(). () {
41 whichscip-shell system . . which. $1 >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
42 }
43
44 TMP_DIR="/tmp/$(basenamescip-shell system . . basename. "$(dirnamescip-shell system . . dirname. "$(readlinkscip-shell system . . readlink. -f "${BASH_SOURCE[0]}")")")"
45
46 rmscip-shell system . . rm. -fr $TMP_DIR >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
47 mkdirscip-shell system . . mkdir. -p $TMP_DIR
48
49 # Add to sed -e below to test "ip_link_supports_bridge='false'" (RHEL6)
50 # -e "s#\$ip_link_supports_bridge#'false'#" \
51
52 # Add to sed -e below to test 'readlink' taking only 1 filename (RHEL6)
53 # -e 's#readlink /foo /bar#! readlink /foo /bar#' \
54
55 # Add to sed -e below to have code using 'brctl' instead of 'ip link' (RHEL6)
56 # -e "s#\$net_devices_have_lower_links#'false'#" \
57 sedscip-shell system . . sed. -e "s#^network_devices_setup_script=.*#network_devices_setup_script=$TMP_DIR/60-network-devices.sh#" \
58 $REAR_DIR/usr/share/rear/rescue/GNU/Linux/310_network_devices.sh > $TMP_DIR/310_network_devices.sh
59 sedscip-shell system . . sed. "s#^network_routing_setup_script=.*#network_routing_setup_script=$TMP_DIR/62-routing.sh#" $REAR_DIR/usr/share/rear/rescue/GNU/Linux/350_routing.sh > $TMP_DIR/350_routing.sh
60
61 . $TMP_DIR/310_network_devices.sh
62 . $TMP_DIR/350_routing.sh
63
64 for f in $TMP_DIR/60-network-devices.sh $TMP_DIR/62-routing.sh; do
65 grepscip-shell system . . grep. -v "dev eth0" $f > $RESULT_DIR/$(basenamescip-shell system . . basename. $f)
66 done