Browse Source

unet: Updated (0.1 -> 0.2)

karasz/new-early
Alejandro Mery 16 years ago committed by Alejandro Mery
parent
commit
91e30bc749
  1. 39
      network/unet/84938ba027730cd1b2fe589b2bcd635df9dbd01b.patch
  2. 74
      network/unet/b14b068f16ac1df54155a3174b32b458d53d4281.patch
  3. 47
      network/unet/e17c45c1aedecec457ae341fca456baad7668a3b.patch
  4. 3
      network/unet/unet.conf
  5. 6
      network/unet/unet.desc

39
network/unet/84938ba027730cd1b2fe589b2bcd635df9dbd01b.patch

@ -1,39 +0,0 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../unet/84938ba027730cd1b2fe589b2bcd635df9dbd01b.patch
# Copyright (C) 2009 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
From 84938ba027730cd1b2fe589b2bcd635df9dbd01b Mon Sep 17 00:00:00 2001
From: Alejandro Mery<amery@geeks.cl>
Date: Tue, 17 Feb 2009 17:04:07 +0000
Subject: unet-dhcp: added 'down' mode to udhcpc script
---
diff --git a/unet-udhcpc.in b/unet-udhcpc.in
index 9963cd3..44a3c6d 100644
--- a/unet-udhcpc.in
+++ b/unet-udhcpc.in
@@ -28,6 +28,10 @@ bound)
echo "nameserver $x" >> /etc/resolv.conf
done
;;
+down)
+ ip addr flush dev "$interface"
+ ip link set "$interface" down
+ ;;
leasefail|*)
false
;;
--
cgit v0.8.1

74
network/unet/b14b068f16ac1df54155a3174b32b458d53d4281.patch

@ -1,74 +0,0 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../unet/b14b068f16ac1df54155a3174b32b458d53d4281.patch
# Copyright (C) 2009 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
From b14b068f16ac1df54155a3174b32b458d53d4281 Mon Sep 17 00:00:00 2001
From: Alejandro Mery<amery@geeks.cl>
Date: Tue, 17 Feb 2009 17:05:11 +0000
Subject: unet-dhcp: added 'down' support when using runit-mode
---
diff --git a/unet-dhcp.in b/unet-dhcp.in
index 6f9840d..4129ebc 100644
--- a/unet-dhcp.in
+++ b/unet-dhcp.in
@@ -63,7 +63,19 @@ if [ "x$1" = "xdown" ]; then
[ "$iface_type" = "dhcp" ] || die "$iface: Not dhcp."
- die "$action: Not Yet Implemented."
+ if [ -n "$servicedir" ]; then
+ # runit
+ myservice="$rundatadir/service/$iface"
+
+ $sv force-stop "$myservice"
+ $sv d "$myservice/log"
+
+ rm "$servicedir/$iface"
+
+ $sv e "$myservice"
+ else
+ die "$action: Not Yet Implemented."
+ fi
fi
elif [ -s "$iface_file" ]; then
die "$iface: Interface already started."
@@ -84,6 +96,15 @@ else
exec udhcpc -f -i $iface -s "$sbindir/unet-udhcpc"
EOT
+ cat > "$myservice/finish" <<-EOT
+ #!/bin/sh
+ exec 2>&1
+
+ export interface=$iface
+
+ exec "$sbindir/unet-udhcpc" down
+ EOT
+
cat > "$myservice/log/run" <<-EOT
#!/bin/sh
@@ -92,7 +113,7 @@ else
exec svlogd -tt "$logdir"
EOT
- chmod +x "$myservice/run" "$myservice/log/run"
+ chmod +x "$myservice/run" "$myservice/log/run" "$myservice/finish"
ln -snf "$myservice" "$servicedir/$iface"
else
--
cgit v0.8.1

47
network/unet/e17c45c1aedecec457ae341fca456baad7668a3b.patch

@ -1,47 +0,0 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../unet/e17c45c1aedecec457ae341fca456baad7668a3b.patch
# Copyright (C) 2009 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
From e17c45c1aedecec457ae341fca456baad7668a3b Mon Sep 17 00:00:00 2001
From: Alejandro Mery<amery@geeks.cl>
Date: Tue, 17 Feb 2009 17:00:28 +0000
Subject: unet: implemented `unet down` loop over set up interfaces
---
diff --git a/unet.in b/unet.in
index 2c0dde4..1cff9e1 100644
--- a/unet.in
+++ b/unet.in
@@ -120,8 +120,16 @@ case "$action" in
fi
done
;;
- down) die "$action: Not Yet Implemented."
- ;;
+ down)
+ for iface in $(ls -1 "$rundatadir/"); do
+ if [ -s "$rundatadir/$iface" ]; then
+ if [ "$wanted" = auto -o "$iface" = "$wanted" ]; then
+ type=$(cat "$rundatadir/$iface")
+ "$sbindir/unet-$type" "$iface" down
+ fi
+ fi
+ done
+ ;;
*) die "$action: Invalid action"
;;
esac
--
cgit v0.8.1

3
network/unet/unet.conf

@ -2,7 +2,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../unet/unet.conf
# Copyright (C) 2008 The OpenSDE Project
# Copyright (C) 2008 - 2009 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
@ -13,4 +13,3 @@
# --- SDE-COPYRIGHT-NOTE-END ---
cleanconfopt=0
custextract=autoextract_subdir_tar_bz2

6
network/unet/unet.desc

@ -2,7 +2,7 @@
[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch.
[COPY]
[COPY] Filename: package/.../unet/unet.desc
[COPY] Copyright (C) 2008 The OpenSDE Project
[COPY] Copyright (C) 2008 - 2009 The OpenSDE Project
[COPY]
[COPY] More information can be found in the files COPYING and README.
[COPY]
@ -24,7 +24,7 @@
[L] GPL
[S] Beta
[V] 0.1
[V] 0.2
[P] O -?---5---9 800.000
[D] 926998332 unet-0.1.tar.bz2 !http://git.opensde.net/users/amery/unet/snapshot/unet-0.1.tar.bz2?id=0.1
[D] 3733751618 unet-0.2.tar.bz2 !http://wiki.opensde.net/lib/exe/fetch.php/users:mnemoc:unet-0.2.tar.bz2

Loading…
Cancel
Save