Skip to content

Commit f7a3270

Browse files
author
Olivier BLIN
committed
Remove /run/network directory creation in codebase
and /etc/network/run directory symlink. We no longer need to worry about the existence of this directory. The system handles the creation.
1 parent 2f92e4c commit f7a3270

3 files changed

Lines changed: 1 addition & 11 deletions

File tree

etc/init.d/networking

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Default-Start: S
77
# Default-Stop: 0 6
88
# Short-Description: Raise network interfaces.
9-
# Description: Prepare /run/network directory, ifstate file and raise network interfaces, or take them down.
9+
# Description: Prepare ifstate file and raise network interfaces, or take them down.
1010
### END INIT INFO
1111

1212
RUN_DIR="/run/network"
@@ -128,9 +128,6 @@ ifup_hotplug () {
128128
ifupdown_init() {
129129
# remove state file at boot
130130
[ ! -e ${IFSTATE_LOCKFILE} ] && rm -f ${IFSTATE_FILE}
131-
[ ! -e /run/network ] && mkdir -p /run/network &>/dev/null
132-
[ ! -e /etc/network/run ] && \
133-
ln -sf /run/network /etc/network/run &>/dev/null
134131
}
135132

136133
case "$1" in

ifupdown2/ifupdown/statemanager.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ def init(self):
107107
except Exception as e:
108108
raise Exception("statemanager: unable to create required directory: %s" % str(e))
109109

110-
if not os.path.exists(self.state_rundir):
111-
os.makedirs(self.state_rundir)
112-
113110
self.state_file = "%s/%s" % (self.state_dir, self.state_filename)
114111

115112
def _init_makedirs_state_dir(self):

ifupdown2/sbin/start-networking

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,6 @@ ifup_mgmt () {
108108
ifupdown_init() {
109109
# remove state file at boot
110110
[ ! -e ${IFSTATE_LOCKFILE} ] && rm -f ${IFSTATE_FILE}
111-
112-
[ ! -e /run/network ] && mkdir -p /run/network &>/dev/null
113-
[ ! -e /etc/network/run ] && \
114-
ln -sf /run/network /etc/network/run &>/dev/null
115111
}
116112

117113
case "$1" in

0 commit comments

Comments
 (0)