]>
Commit | Line | Data |
---|---|---|
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 |
5 | PATH=/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 | |
11 | need_hostname | |
12 | ||
13 | CONFIG=$1 | |
14 | ||
15 | [ -z "$CONFIG" ] && { | |
12de71be | 16 | echo "usage: ifup <device name>" >&2 |
7742e157 AF |
17 | exit 1 |
18 | } | |
19 | ||
6955eb97 | 20 | if [ `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 | |
26 | fi | |
27 | ||
28 | source_config | |
29 | ||
830949ca | 30 | if [ "foo$2" = "fooboot" -a "${ONBOOT}" = "no" ]; then |
7742e157 AF |
31 | exit |
32 | fi | |
33 | ||
34 | IPSETUP=no | |
35 | ||
4ac87c24 AM |
36 | # pelna nazwa dewajsa jaka podal user |
37 | FULLDEVNAME="$DEVICE" | |
38198f50 | 38 |