Debian Codegraph @

setup/files/misc/networking

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2 ### BEGIN INIT INFO
3 # Provides: networking ifupdown
4 # Required-Start: mountkernfs $local_fs urandom
5 # Required-Stop: $local_fs
6 # Default-Start: S
7 # Default-Stop: 0 6
8 # Short-Description: Raise network interfaces.
9 # Description: Prepare /run/network directory, ifstate file.
10 ### END INIT INFO
11 # Steven Shiau <steven _at_ clonezilla org>
12 # License: GPL
13 # This program is used to replace the original networking service. Because in DRBL client, we do not have to start network by service since it's done in initrd. However, some action still need networking to finish some setting, e.g. /etc/network/if-up.d/mountnfs will check if all the network service is configured by ifup, which will write status in /run/network/ifstate. This service is used to similate networking service, create some required status file, but do not actually run ifup/ifdown for the network deivce.
14 # Ref: /etc/init.d/networking on Debian system.
15
16 #
17 DRBL_SCRIPT_PATH="${DRBL_SCRIPT_PATH:-/usr/share/drbl}"
18 . $DRBL_SCRIPT_PATH/sbin/drbl-conf-functions
19
20 # /etc/init.d/networking will create /run/network, and /run/network/ifstate so that ifup and ifdown can write files.
21 RUN_DIR="/run/networkscip-shell filesystem . . `/run/network`."
22 IFSTATE="$RUN_DIR/ifstate"
23
24 mkdirscip-shell system . . mkdir. -p "$RUN_DIR"
25 :> "$IFSTATE"
26
27 #
28 all_dev="$(get-nic-devs)"
29 echoscip-shell system . . echo. "lo=lo" > "$IFSTATE"
30 for i in $all_dev; do
31 echoscip-shell system . . echo. "$i=$i" >> "$IFSTATE"
32 done