]> git.pld-linux.org Git - projects/rc-scripts.git/blame - sysconfig/network-scripts/ifup
- fix nls() function
[projects/rc-scripts.git] / sysconfig / network-scripts / ifup
CommitLineData
6955eb97 1#!/bin/sh
b0443108 2#
8b3e2b71 3# $Id: ifup,v 1.29 1999/10/13 21:28:40 kloczek Exp $
b0443108 4#
7742e157
AF
5PATH=/sbin:/usr/sbin:/bin:/usr/bin
6
7e04fe0e 7. /etc/sysconfig/network
f3002e12 8. /etc/rc.d/init.d/functions
8b3e2b71 9. /etc/sysconfig/network-scripts/.functions
7742e157
AF
10
11need_hostname
12
13CONFIG=$1
14
15[ -z "$CONFIG" ] && {
12de71be 16 echo "usage: ifup <device name>" >&2
7742e157
AF
17 exit 1
18}
19
6955eb97 20if [ `id -u` != 0 ]; then
7742e157
AF
21 if [ -x /usr/sbin/usernetctl ]; then
22 exec /usr/sbin/usernetctl $CONFIG up
23 fi
24 echo "Users cannot control this device." >&2
25 exit 1
26fi
27
28source_config
29
830949ca 30if [ "foo$2" = "fooboot" -a "${ONBOOT}" = "no" ]; then
7742e157
AF
31 exit
32fi
33
34IPSETUP=no
35
4ac87c24
AM
36# pelna nazwa dewajsa jaka podal user
37FULLDEVNAME="$DEVICE"
38198f50 38