mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-08 21:16:39 +09:00
48 lines
1.7 KiB
Bash
Executable File
48 lines
1.7 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# -------------------------------------------------------------------------- #
|
|
# Copyright 2010-2012, C12G Labs S.L. #
|
|
# #
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
|
# not use this file except in compliance with the License. You may obtain #
|
|
# a copy of the License at #
|
|
# #
|
|
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
# #
|
|
# Unless required by applicable law or agreed to in writing, software #
|
|
# distributed under the License is distributed on an "AS IS" BASIS, #
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
|
|
# See the License for the specific language governing permissions and #
|
|
# limitations under the License. #
|
|
#--------------------------------------------------------------------------- #
|
|
|
|
rm -f /etc/udev/rules.d/70-persistent-cd.rules
|
|
rm -f /etc/udev/rules.d/70-persistent-net.rules
|
|
|
|
RUNLEVEL=$(runlevel | cut -d' ' -f2)
|
|
|
|
(
|
|
|
|
cd /etc/rc${RUNLEVEL}.d
|
|
ln -sf ../init.d/vmcontext S99vmcontext
|
|
|
|
)
|
|
|
|
# Debian based distros
|
|
if [ -d /etc/network ]; then
|
|
cp /etc/network/interfaces /etc/network/interfaces.$(date "+%s")
|
|
|
|
cat > /etc/network/interfaces <<EOT
|
|
# The loopback network interface
|
|
auto lo
|
|
iface lo inet loopback
|
|
EOT
|
|
fi
|
|
|
|
# RedHat based distros
|
|
if [ -d /etc/sysconfig/network-scripts ]; then
|
|
rm -f /etc/sysconfig/network-scripts/ifcfg-eth*
|
|
fi
|
|
|
|
|