Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 318206 Details for
Bug 420165
Add init scripts for encrypted swap and jails
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to add encswap script to OpenRC
openrc-fbsd-encswap-script.patch (text/plain), 2.15 KB, created by
Richard Yao (RETIRED)
on 2012-07-15 02:38:53 UTC
(
hide
)
Description:
Patch to add encswap script to OpenRC
Filename:
MIME Type:
Creator:
Richard Yao (RETIRED)
Created:
2012-07-15 02:38:53 UTC
Size:
2.15 KB
patch
obsolete
>commit 7010034e19d06e39cd9575afdadc436602d6e3e7 >Author: Richard Yao <ryao@cs.stonybrook.edu> >Date: Sat Jul 14 19:39:02 2012 -0400 > > Import encswap init script from FreeBSD > > The FreeBSD encswap init script has been adapted to function in OpenRC. It > should function identically to its FreeBSD counterpart. > > Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu> > >diff --git a/init.d/Makefile b/init.d/Makefile >index a34ee90..03daa52 100644 >--- a/init.d/Makefile >+++ b/init.d/Makefile >@@ -22,8 +22,8 @@ NET_LO-FreeBSD= net.lo0 > SRCS-FreeBSD= hostid.in moused.in newsyslog.in pf.in rarpd.in rc-enabled.in \ > rpcbind.in savecore.in syslogd.in > # These are FreeBSD specific >-SRCS-FreeBSD+= adjkerntz.in devd.in dumpon.in ipfw.in mixer.in nscd.in \ >- powerd.in syscons.in >+SRCS-FreeBSD+= adjkerntz.in devd.in encswap.in dumpon.in ipfw.in \ >+ mixer.in nscd.in powerd.in syscons.in > > NET_LO-Linux= net.lo > SRCS-Linux= devfs.in dmesg.in hwclock.in consolefont.in keymaps.in \ >diff --git a/init.d/encswap.in b/init.d/encswap.in >new file mode 100644 >index 0000000..a03fe58 >--- /dev/null >+++ b/init.d/encswap.in >@@ -0,0 +1,46 @@ >+#!@PREFIX@/sbin/runscript >+# Copyright 1992-2012 FreeBSD Project >+# Released under the 2-clause BSD license >+# $Header: $ >+ >+depend() { >+ before swap >+} >+ >+start() { >+ while read device mountpoint type options rest ; do >+ case ":${device}:${type}:${options}" in >+ :#*) >+ continue >+ ;; >+ *.bde:swap:sw) >+ passphrase=`dd if=/dev/random count=1 2>/dev/null | md5 -q` >+ device="${device%.bde}" >+ gbde init "${device}" -P "${passphrase}" || return 1 >+ gbde attach "${device}" -p "${passphrase}" || return 1 >+ ;; >+ *.eli:swap:sw) >+ device="${device%.eli}" >+ geli onetime ${geli_swap_flags} "${device}" || return 1 >+ ;; >+ esac >+ done < /etc/fstab >+} >+ >+stop() { >+ while read device mountpoint type options rest ; do >+ case ":${device}:${type}:${options}" in >+ :#*) >+ continue >+ ;; >+ *.bde:swap:sw) >+ device="${device%.bde}" >+ gbde detach "${device}" >+ ;; >+ *.eli:swap:sw) >+ # Nothing here, because geli swap devices should be >+ # created with the auto-detach-on-last-close option. >+ ;; >+ esac >+ done < /etc/fstab >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 420165
:
314689
|
318174
|
318194
|
318196
|
318198
| 318206 |
365436