updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / virtualbox_bin-1 / vboxnet.patch
blob5bedb671d654b9bdeb2bfe95bc4a353804cefad1
1 --- vboxnet.sh.orig 2008-05-24 15:13:24.565106815 -0300
2 +++ vboxnet.sh 2008-05-24 15:15:59.148424975 -0300
3 @@ -27,94 +27,29 @@
4 # Description: VirtualBox permanent host networking setup
5 ### END INIT INFO
7 +. /etc/rc.conf
8 +. /etc/rc.d/functions
10 PATH=/sbin:/bin:/usr/sbin:/usr/bin:$PATH
11 CONFIG="/etc/vbox/interfaces"
12 VARDIR="/var/run/VirtualBox"
13 VARFILE="/var/run/VirtualBox/vboxnet"
14 TAPDEV="/dev/net/tun"
15 -NOLSB=yes
17 -[ -f /lib/lsb/init-functions ] || NOLSB=yes
18 +fail_msg()
20 + stat_fail
23 -if [ -n "$NOLSB" ]; then
24 - if [ -f /etc/redhat-release ]; then
25 - system=redhat
26 - elif [ -f /etc/SuSE-release ]; then
27 - system=suse
28 - elif [ -f /etc/gentoo-release ]; then
29 - system=gentoo
30 - fi
31 -fi
33 -if [ -z "$NOLSB" ]; then
34 - . /lib/lsb/init-functions
35 - fail_msg() {
36 - echo ""
37 - log_failure_msg "$1"
38 - }
39 - succ_msg() {
40 - log_success_msg " done."
41 - }
42 - begin_msg() {
43 - log_daemon_msg "$@"
44 - }
45 -else
46 - if [ "$system" = "redhat" ]; then
47 - . /etc/init.d/functions
48 - fail_msg() {
49 - echo_failure
50 - echo
51 - echo " ($1)"
52 - }
53 - succ_msg() {
54 - echo_success
55 - echo
56 - }
57 - elif [ "$system" = "suse" ]; then
58 - . /etc/rc.status
59 - fail_msg() {
60 - rc_failed 1
61 - rc_status -v
62 - echo " ($1)"
63 - }
64 - succ_msg() {
65 - rc_reset
66 - rc_status -v
67 - }
68 - elif [ "$system" = "gentoo" ]; then
69 - . /sbin/functions.sh
70 - fail_msg() {
71 - eerror "$1"
72 - }
73 - succ_msg() {
74 - eend "$?"
75 - }
76 - begin_msg() {
77 - ebegin "$1"
78 - }
79 - if [ "`which $0`" = "/sbin/rc" ]; then
80 - shift
81 - fi
82 - else
83 - fail_msg() {
84 - echo " ...failed!"
85 - echo " ($1)"
86 - }
87 - succ_msg() {
88 - echo " ...done."
89 - }
90 - fi
91 - if [ "$system" != "gentoo" ]; then
92 - begin_msg() {
93 - [ -z "${1:-}" ] && return 1
94 - if [ -z "${2:-}" ]; then
95 - echo -n "$1"
96 - else
97 - echo -n "$1: $2"
98 - fi
99 - }
100 - fi
102 +succ_msg()
104 + stat_done
107 +begin_msg()
109 + stat_busy "$*"
112 failure()