Add a tool for hardened migration. - gentoo-tools - Some Gentoo helper tools
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 2bc2d9a37d89529c37a013e89809a66f9dfad0b2
(DIR) parent 057aa4be473dbe970c163ee26935179408d71823
(HTM) Author: Christoph Lohmann <20h@r-36.net>
Date: Sun, 28 Sep 2014 08:17:43 +0200
Add a tool for hardened migration.
Diffstat:
bin/ehardened | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/bin/ehardened b/bin/ehardened
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+set -x
+pnum="$(eselect profile list | grep hardened \
+ | head -n 1 | cut -d '[' -f 2 | cut -d ']' -f 1)"
+if [ -z "$pnum" ];
+tthen
+ printf "hardened profile not available.\n" >&2
+ exit 1
+fi
+
+eselect profile set $pnum
+
+emerge -1 gcc
+gcc-config -l
+source /etc/profile
+
+emerge -1 binutils glibc
+
+printf "You might repeat the steps below.\n"
+emerge -e --keep-going @system
+emerge -e --keep-going @world
+