5 changed files with 4 additions and 165 deletions
@ -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
|
|
@ -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
|
|
@ -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
|
|
Loading…
Reference in new issue