那位大侠帮忙写个启动脚本!
- 提问者网友:杀手的诗
- 2021-05-02 08:14
- 五星知识达人网友:时间的尘埃
- 2021-05-02 08:40
SUSE Linux Enterprise Server 10
vi /etc/init.d/boot.local
#! /bin/sh
#
# Copyright (c) 2002 SuSE Linux AG Nuernberg, Germany. All rights reserved.
#
# Author: Werner Fink <werner@suse.de>, 1996
# Burchard Steinbild, 1996
#
# /etc/init.d/boot.local
#
# script with local commands to be executed from init on system startup
#
# Here you should add things, that should happen directly after booting
# before we're going to the first run level.
#
ifconfig eth0:1 192.168.181.11 up
或者x60:/etc/sysconfig/network # pwd
/etc/sysconfig/network
x60:/etc/sysconfig/network # cat ifcfg-eth-bus-pci-0000\:02\:00.0
BOOTPROTO='static'
ETHTOOL_OPTIONS=''
IFPLUGD_PRIORITY='20'
MTU=''
NAME='Lenovo 82573L Gigabit Ethernet Controller'
IPADDR_1='10.1.1.1'
NETMASK_1='255.255.255.0'
NETWORK_1=''
BROADCAST_1=''
IPADDR_2='10.1.1.2'
NETMASK_2='255.255.255.0'
NETWORK_2=''
BROADCAST_2=''
REMOTE_IPADDR=''
STARTMODE='auto'
UNIQUE='B35A.DLcddtZ5wl3'
USERCONTROL='no'
_nm_name='bus-pci-0000:02:00.0'
PREFIXLEN=''
x60:/etc/sysconfig/network # rcnetwork &>/dev/null
x60:/etc/sysconfig/network # ip addr show eth0
4: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:16:d3:32:ea:dc brd ff:ff:ff:ff:ff:ff
inet 10.1.1.1/24 brd 10.1.1.255 scope global eth0
inet 10.1.1.2/24 brd 10.1.1.255 scope global secondary eth0