Skip to content

Instantly share code, notes, and snippets.

@matthiasr
Created March 15, 2011 15:27
Show Gist options
  • Save matthiasr/870880 to your computer and use it in GitHub Desktop.
Save matthiasr/870880 to your computer and use it in GitHub Desktop.
DragonFly build system: set KERNCONF environment variable by default
commit 318bc983b7cb89a6a7058690ea7b76eb1e89f26b
Author: Matthias Rampke <matthias@rampke.de>
Date: Tue Mar 15 14:09:19 2011 +0100
set KERNCONF environment variable by default
to the currently running kernel's config name (uname -i).
A straightforward kernel upgrade thus reduces to
make buildkernel
make installkernel
Note that if KERNCONFDIR was set before it must be set now as well.
diff --git a/etc/root/dot.cshrc b/etc/root/dot.cshrc
index 702bf7e..029c841 100644
--- a/etc/root/dot.cshrc
+++ b/etc/root/dot.cshrc
@@ -21,6 +21,9 @@ setenv EDITOR vi
setenv PAGER more
setenv BLOCKSIZE K
+# set the default KERNCONF to what is currently running
+setenv KERNCONF `uname -i`
+
if ($?prompt) then
# An interactive shell -- set some stuff up
set prompt = "`hostname -s`# "
diff --git a/etc/root/dot.profile b/etc/root/dot.profile
index 0daf271..8faabbb 100644
--- a/etc/root/dot.profile
+++ b/etc/root/dot.profile
@@ -9,3 +9,5 @@ TERM=${TERM:-cons25}
export TERM
PAGER=more
export PAGER
+KERNCONF=$(uname -i)
+export KERNCONF
diff --git a/share/skel/dot.cshrc b/share/skel/dot.cshrc
index d1cb07b..3b83d87 100644
--- a/share/skel/dot.cshrc
+++ b/share/skel/dot.cshrc
@@ -21,6 +21,9 @@ setenv EDITOR vi
setenv PAGER more
setenv BLOCKSIZE K
+# set the default KERNCONF to what is currently running
+setenv KERNCONF `uname -i`
+
if ($?prompt) then
# An interactive shell -- set some stuff up
set filec
diff --git a/share/skel/dot.profile b/share/skel/dot.profile
index 89583fe..72d8c39 100644
--- a/share/skel/dot.profile
+++ b/share/skel/dot.profile
@@ -22,4 +22,7 @@ PAGER=more; export PAGER
# set ENV to a file invoked each time sh is started for interactive use.
ENV=$HOME/.shrc; export ENV
+# set the default KERNCONF to what is currently running
+KERNCONF=$(uname -i); export KERNCONV
+
[ -x /usr/games/fortune ] && /usr/games/fortune dragonfly-tips
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment