code:
# $Id$
# $MirOS: src/bin/mksh/dot.mkshrc,v 1.114 2017/03/19 22:31:26 tg Exp $
#-
# Copyright (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010,
#		2011, 2012, 2013, 2014, 2015, 2016, 2017
#	mirabilos <m@mirbsd.org>
#
# Provided that these terms and disclaimer and all copyright notices
# are retained or reproduced in an accompanying document, permission
# is granted to deal in this work without restriction, including un-
# limited rights to use, publicly perform, distribute, sell, modify,
# merge, give away, or sublicence.
#
# This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to
# the utmost extent permitted by applicable law, neither express nor
# implied; without malicious intent or gross negligence. In no event
# may a licensor, author or contributor be held liable for indirect,
# direct, other damage, loss, or other issues arising in any way out
# of dealing in the work, even if advised of the possibility of such
# damage or existence of a defect, except proven that it results out
# of said person's immediate fault when using the work as intended.
#-
# ${ENV:-~/.mkshrc}: mksh initialisation file for interactive shells

# catch non-mksh, non-lksh, trying to run this file
case ${KSH_VERSION:-} in
*LEGACY\ KSH*|*MIRBSD\ KSH*) ;;
*) \return 0 ;;
esac

# give MidnightBSD's laffer1 a bit of csh feeling
function setenv {
	if (( $# )); then
		\\builtin eval '\\builtin export "$1"="${2:-}"'
	else
		\\builtin typeset -x
	fi
}

# pager (not control character safe)
smores() (
	\\builtin set +m
	\\builtin cat "$@" |&
	\\builtin trap "rv=\$?; \\\\builtin kill $! >/dev/null 2>&1; \\\\builtin exit \$rv" EXIT
	while IFS= \\builtin read -pr line; do
		llen=${%line}
		(( llen == -1 )) && llen=${#line}
		(( llen = llen ? (llen + COLUMNS - 1) / COLUMNS : 1 ))
		if (( (curlin += llen) >= LINES )); then
			\\builtin print -nr -- $'\e[7m--more--\e[0m'
			\\builtin read -u1 || \\builtin exit $?
			[[ $REPLY = [Qq]* ]] && \\builtin exit 0
			curlin=$llen
		fi
		\\builtin print -r -- "$line"
	done
)

\\builtin alias ls=ls l='ls -F' la='l -a' ll='l -l' lo='l -alo'
\: "${HOSTNAME:=$(\\builtin ulimit -c 0; \\builtin print -r -- $(hostname \
    2>/dev/null))}${EDITOR:=/bin/ed}${TERM:=vt100}${USER:=$(\\builtin ulimit \
    -c 0; id -un 2>/dev/null)}${USER:=?}"
[[ $HOSTNAME = ?(?(ip6-)localhost?(6)) ]] && HOSTNAME=nil; \\builtin unalias ls
\\builtin export EDITOR HOSTNAME TERM USER

# minimal support for lksh users
if [[ $KSH_VERSION = *LEGACY\ KSH* ]]; then
	PS1='$USER@${HOSTNAME%%.*}:$PWD>'
	\\builtin return 0
fi

# mksh-specific from here
\: "${MKSH:=$(\\builtin whence -p mksh)}${MKSH:=/bin/mksh}"
\\builtin export MKSH

PS4='[$EPOCHREALTIME] '; PS1='#'; (( USER_ID )) && PS1='$'; PS1=$'\001\r''${|
	\\builtin typeset e=$?

	(( e )) && REPLY+="$e|"
	REPLY+=${USER}@${HOSTNAME%%.*}:

	\\builtin typeset d=${PWD:-?}/ p=~; [[ $p = ?(*/) ]] || d=${d/#$p\//\~/}
	d=${d%/}; \\builtin typeset m=${%d} n p=...; (( m > 0 )) || m=${#d}
	(( m > (n = (COLUMNS/3 < 7 ? 7 : COLUMNS/3)) )) && d=${d:(-n)} || p=
	REPLY+=$p$d

	\\builtin return $e
} '"$PS1 "
\\builtin alias doch='sudo mksh -c "$(\\builtin fc -ln -1)"'
\\builtin command -v rot13 >/dev/null || \\builtin alias rot13='tr \
    abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ \
    nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'
if \\builtin command -v hd >/dev/null; then
	\:
elif \\builtin command -v hexdump >/dev/null; then
	function hd {
		hexdump -e '"%08.8_ax  " 8/1 "%02X " " - " 8/1 "%02X "' \
		    -e '"  |" "%_p"' -e '"|\n"' "$@"
	}
else
	function hd {
		\\builtin typeset -Uui16 -Z11 pos=0
		\\builtin typeset -Uui16 -Z5 hv=2147483647
		\\builtin typeset dasc line i
		\\builtin set +U

		\\builtin cat "$@" | if \\builtin read -arN -1 line; then
			\\builtin typeset -i1 'line[*]'
			i=0
			while (( i < ${#line[*]} )); do
				hv=${line[i++]}
				if (( (pos & 15) == 0 )); then
					(( pos )) && \
					    \\builtin print -r -- "$dasc|"
					\\builtin print -nr "${pos#16#}  "
					dasc=' |'
				fi
				\\builtin print -nr "${hv#16#} "
				#XXX EBCDIC, but we need [[:print:]] to fix this
				if (( (hv < 32) || (hv > 126) )); then
					dasc+=.
				else
					dasc+=${line[i-1]#1#}
				fi
				(( (pos++ & 15) == 7 )) && \
				    \\builtin print -nr -- '- '
			done
			while (( pos & 15 )); do
				\\builtin print -nr '   '
				(( (pos++ & 15) == 7 )) && \
				    \\builtin print -nr -- '- '
			done
			(( hv == 2147483647 )) || \\builtin print -r -- "$dasc|"
		fi
	}
fi

# Berkeley C shell compatible dirs, popd, and pushd functions
# Z shell compatible chpwd() hook, used to update DIRSTACK[0]
DIRSTACKBASE=$(\\builtin realpath ~/. 2>/dev/null || \
    \\builtin print -nr -- "${HOME:-/}")
\\builtin set -A DIRSTACK
function chpwd {
	DIRSTACK[0]=$(\\builtin realpath . 2>/dev/null || \
	    \\builtin print -nr -- "$PWD")
	[[ $DIRSTACKBASE = ?(*/) ]] || \
	    DIRSTACK[0]=${DIRSTACK[0]/#$DIRSTACKBASE/\~}
	\:
}
\chpwd .
cd() {
	\\builtin cd "$@" || \\builtin return $?
	\chpwd "$@"
}
function cd_csh {
	\\builtin typeset d t=${1/#\~/$DIRSTACKBASE}

	if ! d=$(\\builtin cd "$t" 2>&1); then
		\\builtin print -ru2 "${1}: ${d##*cd: $t: }."
		\\builtin return 1
	fi
	\cd "$t"
}
function dirs {
	\\builtin typeset d dwidth
	\\builtin typeset -i fl=0 fv=0 fn=0 cpos=0

	while \\builtin getopts ":lvn" d; do
		case $d {
		(l)	fl=1 ;;
		(v)	fv=1 ;;
		(n)	fn=1 ;;
		(*)	\\builtin print -ru2 'Usage: dirs [-lvn].'
			\\builtin return 1 ;;
		}
	done
	\\builtin shift $((OPTIND - 1))
	if (( $# > 0 )); then
		\\builtin print -ru2 'Usage: dirs [-lvn].'
		\\builtin return 1
	fi
	if (( fv )); then
		fv=0
		while (( fv < ${#DIRSTACK[*]} )); do
			d=${DIRSTACK[fv]}
			(( fl )) && d=${d/#\~/$DIRSTACKBASE}
			\\builtin print -r -- "$fv	$d"
			(( ++fv ))
		done
	else
		fv=0
		while (( fv < ${#DIRSTACK[*]} )); do
			d=${DIRSTACK[fv]}
			(( fl )) && d=${d/#\~/$DIRSTACKBASE}
			(( dwidth = (${%d} > 0 ? ${%d} : ${#d}) ))
			if (( fn && (cpos += dwidth + 1) >= 79 && \
			    dwidth < 80 )); then
				\\builtin print
				(( cpos = dwidth + 1 ))
			fi
			\\builtin print -nr -- "$d "
			(( ++fv ))
		done
		\\builtin print
	fi
	\\builtin return 0
}
function popd {
	\\builtin typeset d fa
	\\builtin typeset -i n=1

	while \\builtin getopts ":0123456789lvn" d; do
		case $d {
		(l|v|n)	fa+=" -$d" ;;
		(+*)	n=2
			\\builtin break ;;
		(*)	\\builtin print -ru2 'Usage: popd [-lvn] [+<n>].'
			\\builtin return 1 ;;
		}
	done
	\\builtin shift $((OPTIND - n))
	n=0
	if (( $# > 1 )); then
		\\builtin print -ru2 popd: Too many arguments.
		\\builtin return 1
	elif [[ $1 = ++([0-9]) && $1 != +0 ]]; then
		if (( (n = ${1#+}) >= ${#DIRSTACK[*]} )); then
			\\builtin print -ru2 popd: Directory stack not that deep.
			\\builtin return 1
		fi
	elif [[ -n $1 ]]; then
		\\builtin print -ru2 popd: Bad directory.
		\\builtin return 1
	fi
	if (( ${#DIRSTACK[*]} < 2 )); then
		\\builtin print -ru2 popd: Directory stack empty.
		\\builtin return 1
	fi
	\\builtin unset DIRSTACK[n]
	\\builtin set -A DIRSTACK -- "${DIRSTACK[@]}"
	\cd_csh "${DIRSTACK[0]}" || \\builtin return 1
	\dirs $fa
}
function pushd {
	\\builtin typeset d fa
	\\builtin typeset -i n=1

	while \\builtin getopts ":0123456789lvn" d; do
		case $d {
		(l|v|n)	fa+=" -$d" ;;
		(+*)	n=2
			\\builtin break ;;
		(*)	\\builtin print -ru2 'Usage: pushd [-lvn] [<dir>|+<n>].'
			\\builtin return 1 ;;
		}
	done
	\\builtin shift $((OPTIND - n))
	if (( $# == 0 )); then
		if (( ${#DIRSTACK[*]} < 2 )); then
			\\builtin print -ru2 pushd: No other directory.
			\\builtin return 1
		fi
		d=${DIRSTACK[1]}
		DIRSTACK[1]=${DIRSTACK[0]}
		\cd_csh "$d" || \\builtin return 1
	elif (( $# > 1 )); then
		\\builtin print -ru2 pushd: Too many arguments.
		\\builtin return 1
	elif [[ $1 = ++([0-9]) && $1 != +0 ]]; then
		if (( (n = ${1#+}) >= ${#DIRSTACK[*]} )); then
			\\builtin print -ru2 pushd: Directory stack not that deep.
			\\builtin return 1
		fi
		while (( n-- )); do
			d=${DIRSTACK[0]}
			\\builtin unset DIRSTACK[0]
			\\builtin set -A DIRSTACK -- "${DIRSTACK[@]}" "$d"
		done
		\cd_csh "${DIRSTACK[0]}" || \\builtin return 1
	else
		\\builtin set -A DIRSTACK -- placeholder "${DIRSTACK[@]}"
		\cd_csh "$1" || \\builtin return 1
	fi
	\dirs $fa
}

# base64 encoder and decoder, RFC compliant, NUL safe, not EBCDIC safe
function Lb64decode {
	\\builtin set +U
	\\builtin typeset c s="$*" t
	[[ -n $s ]] || { s=$(\\builtin cat; \\builtin print x); s=${s%x}; }
	\\builtin typeset -i i=0 j=0 n=${#s} p=0 v x
	\\builtin typeset -i16 o

	while (( i < n )); do
		c=${s:(i++):1}
		case $c {
		(=)	\\builtin break ;;
		([A-Z])	(( v = 1#$c - 65 )) ;;
		([a-z])	(( v = 1#$c - 71 )) ;;
		([0-9])	(( v = 1#$c + 4 )) ;;
		(+)	v=62 ;;
		(/)	v=63 ;;
		(*)	\\builtin continue ;;
		}
		(( x = (x << 6) | v ))
		case $((p++)) {
		(0)	\\builtin continue ;;
		(1)	(( o = (x >> 4) & 255 )) ;;
		(2)	(( o = (x >> 2) & 255 )) ;;
		(3)	(( o = x & 255 ))
			p=0
			;;
		}
		t+=\\x${o#16#}
		(( ++j & 4095 )) && \\builtin continue
		\\builtin print -n $t
		t=
	done
	\\builtin print -n $t
}
function Lb64encode {
	\\builtin set +U
	\\builtin typeset c s t table
	\\builtin set -A table -- A B C D E F G H I J K L M N O P Q R S T U V W X Y Z \
	    a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 + /
	if (( $# )); then
		\\builtin read -raN-1 s <<<"$*"
		\\builtin unset s[${#s[*]}-1]
	else
		\\builtin read -raN-1 s
	fi
	\\builtin typeset -i i=0 n=${#s[*]} v

	while (( i < n )); do
		(( v = s[i++] << 16 ))
		(( v |= s[i++] << 8 ))
		(( v |= s[i++] ))
		t+=${table[v >> 18]}${table[v >> 12 & 63]}
		c=${table[v >> 6 & 63]}
		if (( i <= n )); then
			t+=$c${table[v & 63]}
		elif (( i == n + 1 )); then
			t+=$c=
		else
			t+===
		fi
		if (( ${#t} == 76 || i >= n )); then
			\\builtin print -r $t
			t=
		fi
	done
}

# Better Avalanche for the Jenkins Hash
\\builtin typeset -Z11 -Uui16 Lbafh_v
function Lbafh_init {
	Lbafh_v=0
}
function Lbafh_add {
	\\builtin set +U
	\\builtin typeset s
	if (( $# )); then
		\\builtin read -raN-1 s <<<"$*"
		\\builtin unset s[${#s[*]}-1]
	else
		\\builtin read -raN-1 s
	fi
	\\builtin typeset -i i=0 n=${#s[*]}

	while (( i < n )); do
		((# Lbafh_v = (Lbafh_v + s[i++] + 1) * 1025 ))
		((# Lbafh_v ^= Lbafh_v >> 6 ))
	done
}
function Lbafh_finish {
	\\builtin typeset -Ui t

	((# t = (((Lbafh_v >> 7) & 0x01010101) * 0x1B) ^ \
	    ((Lbafh_v << 1) & 0xFEFEFEFE) ))
	((# Lbafh_v = t ^ (t ^> 8) ^ (Lbafh_v ^> 8) ^ \
	    (Lbafh_v ^> 16) ^ (Lbafh_v ^> 24) ))
	\:
}

# strip comments (and leading/trailing whitespace if IFS is set) from
# any file(s) given as argument, or stdin if none, and spew to stdout
function Lstripcom {
	\\builtin set -o noglob
	\\builtin cat "$@" | while \\builtin read _line; do
		_line=${_line%%#*}
		[[ -n $_line ]] && \\builtin print -r -- $_line
	done
}

# toggle built-in aliases and utilities, and aliases and functions from mkshrc
function enable {
	\\builtin typeset doprnt=0 mode=1 x y z rv=0
	\\builtin typeset b_alias i_alias i_func nalias=0 nfunc=0 i_all
	\\builtin set -A b_alias
	\\builtin set -A i_alias
	\\builtin set -A i_func

	# accumulate mksh built-in aliases, in ASCIIbetical order
	i_alias[nalias]=autoload; b_alias[nalias++]='\\builtin typeset -fu'
	i_alias[nalias]=functions; b_alias[nalias++]='\\builtin typeset -f'
	i_alias[nalias]=hash; b_alias[nalias++]='\\builtin alias -t'
	i_alias[nalias]=history; b_alias[nalias++]='\\builtin fc -l'
	i_alias[nalias]=integer; b_alias[nalias++]='\\builtin typeset -i'
	i_alias[nalias]=local; b_alias[nalias++]='\\builtin typeset'
	i_alias[nalias]=login; b_alias[nalias++]='\\builtin exec login'
	i_alias[nalias]=nameref; b_alias[nalias++]='\\builtin typeset -n'
	i_alias[nalias]=nohup; b_alias[nalias++]='nohup '
	i_alias[nalias]=r; b_alias[nalias++]='\\builtin fc -e -'
	i_alias[nalias]=type; b_alias[nalias++]='\\builtin whence -v'

	# accumulate mksh built-in utilities, in definition order, even ifndef
	i_func[nfunc++]=.
	i_func[nfunc++]=:
	i_func[nfunc++]='['
	i_func[nfunc++]=alias
	i_func[nfunc++]=break
	# \\builtin cannot, by design, be overridden
	i_func[nfunc++]=builtin
	i_func[nfunc++]=cat
	i_func[nfunc++]=cd
	i_func[nfunc++]=chdir
	i_func[nfunc++]=command
	i_func[nfunc++]=continue
	i_func[nfunc++]=echo
	i_func[nfunc++]=eval
	i_func[nfunc++]=exec
	i_func[nfunc++]=exit
	i_func[nfunc++]=export
	i_func[nfunc++]=false
	i_func[nfunc++]=fc
	i_func[nfunc++]=getopts
	i_func[nfunc++]=global
	i_func[nfunc++]=jobs
	i_func[nfunc++]=kill
	i_func[nfunc++]=let
	i_func[nfunc++]=print
	i_func[nfunc++]=pwd
	i_func[nfunc++]=read
	i_func[nfunc++]=readonly
	i_func[nfunc++]=realpath
	i_func[nfunc++]=rename
	i_func[nfunc++]=return
	i_func[nfunc++]=set
	i_func[nfunc++]=shift
	i_func[nfunc++]=source
	i_func[nfunc++]=suspend
	i_func[nfunc++]=test
	i_func[nfunc++]=times
	i_func[nfunc++]=trap
	i_func[nfunc++]=true
	i_func[nfunc++]=typeset
	i_func[nfunc++]=ulimit
	i_func[nfunc++]=umask
	i_func[nfunc++]=unalias
	i_func[nfunc++]=unset
	i_func[nfunc++]=wait
	i_func[nfunc++]=whence
	i_func[nfunc++]=bg
	i_func[nfunc++]=fg
	i_func[nfunc++]=bind
	i_func[nfunc++]=mknod
	i_func[nfunc++]=printf
	i_func[nfunc++]=sleep
	i_func[nfunc++]=domainname
	i_func[nfunc++]=extproc

	# accumulate aliases from dot.mkshrc, in definition order
	i_alias[nalias]=l; b_alias[nalias++]='ls -F'
	i_alias[nalias]=la; b_alias[nalias++]='l -a'
	i_alias[nalias]=ll; b_alias[nalias++]='l -l'
	i_alias[nalias]=lo; b_alias[nalias++]='l -alo'
	i_alias[nalias]=doch; b_alias[nalias++]='sudo mksh -c "$(\\builtin fc -ln -1)"'
	i_alias[nalias]=rot13; b_alias[nalias++]='tr abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'
	i_alias[nalias]=cls; b_alias[nalias++]='\\builtin print -n \\ec'

	# accumulate functions from dot.mkshrc, in definition order
	i_func[nfunc++]=setenv
	i_func[nfunc++]=smores
	i_func[nfunc++]=hd
	i_func[nfunc++]=chpwd
	i_func[nfunc++]=cd
	i_func[nfunc++]=cd_csh
	i_func[nfunc++]=dirs
	i_func[nfunc++]=popd
	i_func[nfunc++]=pushd
	i_func[nfunc++]=Lb64decode
	i_func[nfunc++]=Lb64encode
	i_func[nfunc++]=Lbafh_init
	i_func[nfunc++]=Lbafh_add
	i_func[nfunc++]=Lbafh_finish
	i_func[nfunc++]=Lstripcom
	i_func[nfunc++]=enable

	# collect all identifiers, sorted ASCIIbetically
	\\builtin set -sA i_all -- "${i_alias[@]}" "${i_func[@]}"

	# handle options, we don't do dynamic loading
	while \\builtin getopts "adf:nps" x; do
		case $x {
		(a)
			mode=-1
			;;
		(d)
			# deliberately causing an error, like bash-static
			;|
		(f)
			\\builtin print -ru2 enable: dynamic loading not available
			\\builtin return 2
			;;
		(n)
			mode=0
			;;
		(p)
			doprnt=1
			;;
		(s)
			\\builtin set -sA i_all -- . : break continue eval \
			    exec exit export readonly return set shift times \
			    trap unset
			;;
		(*)
			\\builtin print -ru2 enable: usage: \
			    "enable [-adnps] [-f filename] [name ...]"
			return 2
			;;
		}
	done
	\\builtin shift $((OPTIND - 1))

	# display builtins enabled/disabled/all/special?
	if (( doprnt || ($# == 0) )); then
		for x in "${i_all[@]}"; do
			y=$(\\builtin alias "$x") || y=
			[[ $y = "$x='\\\\builtin whence -p $x >/dev/null || (\\\\builtin print -r mksh: $x: not found; \\\\builtin exit 127) && \$(\\\\builtin whence -p $x)'" ]]; z=$?
			case $mode:$z {
			(-1:0|0:0)
				\\builtin print -r -- "enable -n $x"
				;;
			(-1:1|1:1)
				\\builtin print -r -- "enable $x"
				;;
			}
		done
		\\builtin return 0
	fi

	for x in "$@"; do
		z=0
		for y in "${i_alias[@]}" "${i_func[@]}"; do
			[[ $x = "$y" ]] || \\builtin continue
			z=1
			\\builtin break
		done
		if (( !z )); then
			\\builtin print -ru2 enable: "$x": not a shell builtin
			rv=1
			\\builtin continue
		fi
		if (( !mode )); then
			# disable this
			\\builtin alias "$x=\\\\builtin whence -p $x >/dev/null || (\\\\builtin print -r mksh: $x: not found; \\\\builtin exit 127) && \$(\\\\builtin whence -p $x)"
		else
			# find out if this is an alias or not, first
			z=0
			y=-1
			while (( ++y < nalias )); do
				[[ $x = "${i_alias[y]}" ]] || \\builtin continue
				z=1
				\\builtin break
			done
			if (( z )); then
				# re-enable the original alias body
				\\builtin alias "$x=${b_alias[y]}"
			else
				# re-enable the original utility/function
				\\builtin unalias "$x"
			fi
		fi
	done
	\\builtin return $rv
}

\: place customisations below this line

for p in ~/.etc/bin ~/bin; do
	[[ -d $p/. ]] || \\builtin continue
	[[ $PATHSEP$PATH$PATHSEP = *"$PATHSEP$p$PATHSEP"* ]] || \
	    PATH=$p$PATHSEP$PATH
done

\\builtin export SHELL=$MKSH MANWIDTH=80 LESSHISTFILE=-
\\builtin alias cls='\\builtin print -n \\ec'

#\\builtin unset LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_IDENTIFICATION LC_MONETARY \
#    LC_NAME LC_NUMERIC LC_TELEPHONE LC_TIME
#p=en_GB.UTF-8
#\\builtin export LANG=C LC_CTYPE=$p LC_MEASUREMENT=$p LC_MESSAGES=$p LC_PAPER=$p
#\\builtin set -U

\\builtin unset p

\: place customisations above this line


code:
#
# .profile - Personal shell-initialization file.
#
# The instructions here could serve to complement
# /etc/profile or to override default (previous)
# values.
#

# Add personal bin directory to the end of path
# and make it known to child process

PATH=${PATH}:${HOME}/bin
export PATH

repo_name: dustdfg/dragora

license: mit


code:
# /etc/sysctl.d/10-fs-related.conf - Filesystem related.
#
# Values: [0] DISABLE, [1] ENABLE.
#

# A long-standing class of security issues is the symlink-based
# time-of-check-time-of-use race, most commonly seen in world-writable
# directories like /tmp.  The common method of exploitation of this
# flaw is to cross privilege boundaries when following a given symlink
# (i.e. a root process follows a symlink belonging to another user).
# For a likely incomplete list of hundreds of examples across the
# years, please see:
# http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=/tmp
#
# When set to "0", symlink following behavior is unrestricted.
#
# When set to "1" symlinks are permitted to be followed only when
# outside a sticky world-writable directory, or when the uid of the
# symlink and follower match, or when the directory owner matches the
# symlink's owner.
#
fs.protected_symlinks = 1

# A long-standing class of security issues is the hardlink-based
# time-of-check-time-of-use race, most commonly seen in world-writable
# directories like /tmp.  The common method of exploitation of this
# flaw is to cross privilege boundaries when following a given hardlink
# (i.e. a root process follows a hardlink created by another user).
# Additionally, on systems without separated partitions, this stops
# unauthorized users from "pinning" vulnerable setuid/setgid files
# against being upgraded by the administrator, or linking to special
# files.
#
# When set to "0", hardlink creation behavior is unrestricted.
#
# When set to "1" hardlinks cannot be created by users if they do not
# already own the source file, or do not have read/write access to it.
#
fs.protected_hardlinks = 1


code:
# /etc/sysctl.d/20-sys-related.conf - Kernel system settings, related.
#
# Values: [0] DISABLE, [1] ENABLE.
#

# The four values in printk denote: console_loglevel,
# default_message_loglevel, minimum_console_loglevel and
# default_console_loglevel respectively.
#
# These values influence printk() behavior when printing or
# logging error messages. See 'man 2 syslog' for more info on
# the different loglevels.
#
# - console_loglevel: messages with a higher priority than
#   this will be printed to the console
# - default_message_loglevel: messages without an explicit priority
#   will be printed with this priority
# - minimum_console_loglevel: minimum (highest) value to which
#   console_loglevel can be set
# - default_console_loglevel: default value for console_loglevel
kernel.printk = 1 3 3 3


code:
# /etc/sysctl.d/30-net-related.conf - System control for the network.
#
# Values: [0] DISABLE, [1] ENABLE.
#

# Forward Packets between interfaces.
#
# This variable is special, its change resets all configuration
# parameters to their default state (RFC1122 for hosts, RFC1812
# for routers):
#
net.ipv4.ip_forward = 0

# Reverse path filter.
#
# 0 - No source validation.
# 1 - Strict mode as defined in RFC3704 Strict Reverse Path
#     Each incoming packet is tested against the FIB and if the interface
#     is not the best reverse path the packet check will fail.
#     By default failed packets are discarded.
# 2 - Loose mode as defined in RFC3704 Loose Reverse Path
#     Each incoming packet's source address is also tested against the FIB
#     and if the source address is not reachable via any interface
#     the packet check will fail.
#
net.ipv4.conf.default.rp_filter = 0
net.ipv4.conf.all.rp_filter = 0

# ICMP ECHO requests.
#
# If set true, then the kernel will ignore all ICMP ECHO,
# this to prevent a "smurf" attack:
#
net.ipv4.icmp_echo_ignore_broadcasts = 1

# TCP SYN cookie.
#
# Only valid when the kernel was compiled with CONFIG_SYNCOOKIES
# Send out syncookies when the syn backlog queue of a socket
# overflows. This is to prevent against the common
# 'SYN flood attack':
#
net.ipv4.tcp_syncookies = 1

# TCP timestamps.
#
# Enable timestamps as defined in RFC1323:
#
net.ipv4.tcp_timestamps = 1

# Log martians.
#
# Log packets with impossible addresses to kernel log:
#
net.ipv4.conf.all.log_martians = 1


code:
#! /bin/sh -
#
# Generic perpetrate(5) runscript for udevd(8).
#

if test "$1" = start
then
    exec tinylog_run "$2"
fi


code:
#! /bin/sh -
#
# udevd/rc.main
#
# Device event managing daemon.
#

# Redirects the standard error to the standard output
exec 2>&1

TARGET="$1"
SVNAME="${2:-udevd}"

start()
{
    echo "*** ${SVNAME}: Starting udevd ..."
    udevadm control --exit
    exec /usr/sbin/udevd --debug
}

reset()
{
    case $3 in
    exit)
        echo "*** ${SVNAME}: Exited status $4"
        ;;
    signal)
        echo "*** ${SVNAME}: Killed on signal $5"
        ;;
    *)
        echo "*** ${SVNAME}: Stopped (${3})"
        ;;
    esac
}

# Branch to target
eval ${TARGET} "$@"


code:
# /etc/udev/rules.d/55-dragora.rules: Rule definitions for Dragora.
# Based on the rules provided by the "Linux From Scratch" project.

# COMM devices

KERNEL=="ippp[0-9]*",       GROUP="dialout"
KERNEL=="isdn[0-9]*",       GROUP="dialout"
KERNEL=="isdnctrl[0-9]*",   GROUP="dialout"
KERNEL=="dcbri[0-9]*",      GROUP="dialout"


code:
# /etc/udev/rules.d/60-scheduler.rules: Establish scheduler and settings.

ACTION=="add|change", SUBSYSTEM=="block", DRIVERS=="sd|sr", ATTR{queue/scheduler}!="bfq", ATTR{queue/scheduler}="bfq"


code:
# /etc/udev/rules.d/81-cdrom.rules: Set CD-ROM permissions and get device capabilities.

ACTION=="add", SUBSYSTEM=="block", ENV{ID_TYPE}=="cd", IMPORT{program}="cdrom_id --export $tempnode", GROUP="cdrom"


code:
# /etc/udev/rules.d/83-cdrom-symlinks.rules: Determine CD drive capability.

ACTION!="add",          GOTO="cd_aliases_generator_end"
SUBSYSTEM!="block",     GOTO="cd_aliases_generator_end"
ENV{GENERATED}=="?*",   GOTO="cd_aliases_generator_end"

# Fail the uevent if the autogenerated rules cannot be saved
ENV{ID_CDROM}=="?*", PROGRAM="/bin/grep -c ' / [^[:space:]]* rw' /proc/mounts", RESULT!="2", RUN+="/bin/false", GOTO="cd_aliases_generator_end"

ENV{ID_CDROM}=="?*", PROGRAM="write_cd_aliases", SYMLINK+="%c"

LABEL="cd_aliases_generator_end"


code:
#! /bin/bash

# This script generates rules for persistent network device naming
# Data from udev-182 75-persistent-net-generator.rules
# Updated fof udev-197 (DEVICES=en*)

RULES=/etc/udev/rules.d/70-persistent-net.rules
DEVICES=$(eval echo /sys/class/net/{en*,eth*,ath*,wlan*[0-9],msh*,ra*,sta*,ctc*,lcs*,hsi*})

function usage
{
  echo $msg
  echo "init-net-rules.sh is an LFS-specific script to initialize"
  echo "$RULES"
  exit 1
}

declare -A VENDORS_IGNORED
VENDORS_IGNORED['52:54:00:']="kvm"
VENDORS_IGNORED['00:0c:29:']="vmware"
VENDORS_IGNORED['00:50:56:']="vmware"
VENDORS_IGNORED['00:15:5d:']="hyper-v"
VENDORS_IGNORED['00:00:00:']="invalid"

declare -A VENDORS
VENDORS['02:07:01:']="Interlan, DEC, etc"
VENDORS['02:60:60:']="3com"
VENDORS['02:60:8c:']="3Com IBM PC; Imagen. etc"
VENDORS['02:a0:c9:']="intel"
VENDORS['02:aa:3c:']="Olivetti"
VENDORS['02:cf:1f:']="Masscomp, Silicon Graphics, etc"
VENDORS['02:e0:3b:']="Gigabit"
VENDORS['02:e6:d3:']="BTI"
VENDORS['52:54:00:']="Realtek"
VENDORS['52:54:4c:']="Novell"
VENDORS['52:54:ab:']="Realtek"
VENDORS['e2:0c:0f:']="Kingston"
VENDORS['00:16:3e:']="Xensource"

function ignore_if
{
   if [[ "${VENDORS_IGNORED[$VENDOR]}" != "" ]]; then return 0; fi
   if [[ "${VENDORS[$VENDOR]}"         != "" ]]; then return 1; fi

   byte2=$(echo $VENDOR | cut -c2)
   if echo $byte2 | grep -q "[2367abef]"; then return 0; fi

   return 1  # Default is to not ignore
}

function comment
{
  # Not implemented
  # SUBSYSTEMS=="pci"
  # export COMMENT="PCI device $attr{vendor}:$attr{device} ($driver)"

  # SUBSYSTEMS=="usb", ATTRS{idVendor}=="?*"
  # export COMMENT="USB device 0x$attr{idVendor}:0x$attr{idProduct} ($driver)"

  # SUBSYSTEMS=="pcmcia",
  # export COMMENT="PCMCIA device $attr{card_id}:$attr{manf_id} ($driver)"

  # SUBSYSTEMS=="ieee1394",
  # export COMMENT="Firewire device $attr{host_id})"

  # ibmveth likes to use "locally administered" MAC addresses
  # DRIVERS=="ibmveth",
  # export COMMENT="ibmveth ($id)"

  # S/390 uses id matches only, do not use MAC address match
  # SUBSYSTEMS=="ccwgroup",
  # export COMMENT="S/390 $driver device at $id",
  # export MATCHID="$id"
  # export MATCHDRV="$driver"
  # export MATCHADDR=""

  # Default
  driver=$(basename $(readlink -f $NIC/device/driver/module))
  export COMMENT="net device ${driver}"
}

if ! mountpoint -q /sys; then
  msg="/sys must be mounted"
  usage
fi

if ! mountpoint -q /proc; then
  msg="/proc must be mounted"
  usage
fi

if [ -e $RULES ]; then
  msg="The rules file already exists"
  usage
fi

# Ignore Xen virtual interfaces
if [ -e /proc/xen ]; then
  msg="The rules file should not be created in the Xen environment"
  usage
fi

# Variables used to communicate with write_net_rules:
#   INTERFACE             simple interface name
#   MATCHADDR             MAC address used for the match
#   MATCHID               bus_id used for the match
#   MATCHDRV              driver name used for the match
#   MATCHIFTYPE           interface type match
#   COMMENT               comment to add to the generated rule
#   INTERFACE_NAME        requested name supplied by external tool
#   INTERFACE_NEW         new interface name returned by rule writer

for NIC in $DEVICES; do
     IF=${NIC##*/}
     if echo $NIC | grep -q '*' ; then continue; fi

     export INTERFACE=${NIC##*/}            # Simple interface name
     export MATCHADDR="$(cat $NIC/address)" # Read MAC address

     VENDOR=$(echo $MATCHADDR | cut -c-9)
     if ignore_if; then continue; fi

     export MATCHDEVID="$(cat $NIC/dev_id)"
     export MATCHIFTYPE="$(cat $NIC/type)"  # Read interface type
     comment

     /lib/udev/write_net_rules
done


code:
#!/bin/sh -e

# This script is run if an optical drive lacks a rule for persistent naming.
#
# It adds symlinks for optical drives based on the device class determined
# by cdrom_id and used ID_PATH to identify the device.

# (C) 2006 Marco d'Itri <md@Linux.IT>
#
# This program is free software: you can redistribute it and/or modify
# it 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.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

# debug, if UDEV_LOG=<debug>
if [ -n "$UDEV_LOG" ]; then
        if [ "$UDEV_LOG" -ge 7 ]; then
                set -x
        fi
fi

RULES_FILE="/etc/udev/rules.d/70-persistent-cd.rules"

. /lib/udev/rule_generator.functions

find_next_available() {
        raw_find_next_available "$(find_all_rules 'SYMLINK\+=' "$1")"
}

write_rule() {
        local match="$1"
        local link="$2"
        local comment="$3"

        {
        if [ "$PRINT_HEADER" ]; then
                PRINT_HEADER=
                echo "# This file was automatically generated by the $0"
                echo "# program, run by the cd-aliases-generator.rules rules file."
                echo "#"
                echo "# You can modify it, as long as you keep each rule on a single"
                echo "# line, and set the \$GENERATED variable."
                echo ""
        fi

        [ "$comment" ] && echo "# $comment"
        echo "$match, SYMLINK+=\"$link\", ENV{GENERATED}=\"1\""
        } >> $RULES_FILE
        SYMLINKS="$SYMLINKS $link"
}

if [ -z "$DEVPATH" ]; then
        echo "Missing \$DEVPATH." >&2
        exit 1
fi
if [ -z "$ID_CDROM" ]; then
        echo "$DEVPATH is not a CD reader." >&2
        exit 1
fi

if [ "$1" ]; then
        METHOD="$1"
else
        METHOD='by-path'
fi

case "$METHOD" in
        by-path)
        if [ -z "$ID_PATH" ]; then
                echo "$DEVPATH not supported by path_id. by-id may work." >&2
                exit 1
        fi
        RULE="ENV{ID_PATH}==\"$ID_PATH\""
        ;;

        by-id)
        if [ "$ID_SERIAL" ]; then
                RULE="ENV{ID_SERIAL}==\"$ID_SERIAL\""
        elif [ "$ID_MODEL" -a "$ID_REVISION" ]; then
                RULE="ENV{ID_MODEL}==\"$ID_MODEL\", ENV{ID_REVISION}==\"$ID_REVISION\""
        else
                echo "$DEVPATH not supported by ata_id. by-path may work." >&2
                exit 1
        fi
        ;;

        *)
        echo "Invalid argument (must be either by-path or by-id)." >&2
        exit 1
        ;;
esac

# Prevent concurrent processes from modifying the file at the same time.
lock_rules_file

# Check if the rules file is writeable.
choose_rules_file

link_num=$(find_next_available 'cdrom[0-9]*')

match="SUBSYSTEM==\"block\", ENV{ID_CDROM}==\"?*\", $RULE"

comment="$ID_MODEL ($ID_PATH)"

        write_rule "$match" "cdrom$link_num" "$comment"
[ "$ID_CDROM_CD_R" -o "$ID_CDROM_CD_RW" ] && \
        write_rule "$match" "cdrw$link_num"
[ "$ID_CDROM_DVD" ] && \
        write_rule "$match" "dvd$link_num"
[ "$ID_CDROM_DVD_R" -o "$ID_CDROM_DVD_RW" -o "$ID_CDROM_DVD_RAM" ] && \
        write_rule "$match" "dvdrw$link_num"
echo >> $RULES_FILE

unlock_rules_file

echo $SYMLINKS

exit 0


code:
#! /bin/sh -
exec /usr/bin/flex -l "$@"

path: archive/flex/usr/bin/lex


code:
#! /bin/sh -
#
# Load the fuse module (if exists) and mount the fuse control file system
#
# Copyright (c) 2019-2020 Matias Fonzo, <selk@dragora.org>.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

PROGRAM="${0##*/}"

# Sanity check
if ! command -v fusermount > /dev/null
then
    echo "${0}: Error: fusermount(1) is not available." 1>&2
    exit 127;
fi

# Main functions

fuse_start()
{
    if modinfo fuse > /dev/null 2>&1
    then
        echo "${PROGRAM}: Loading fuse (kernel) module ..."
        modprobe fuse
    fi

    if ! mountpoint -q /sys/fs/fuse/connections
    then
        echo "${PROGRAM}: Mounting fusectl filesystem ..."
        mount -v -t fusectl fusectl /sys/fs/fuse/connections
    else
        echo "${PROGRAM}: FUSE filesystem already mounted at /sys/fs/fuse/connections" 1>&2
    fi
}

fuse_stop()
{
    if mountpoint -q /sys/fs/fuse/connections
    then
        echo "${PROGRAM}: Unmounting FUSE filesystem ..."
        umount -v /sys/fs/fuse/connections
    else
        echo "${PROGRAM}: FUSE filesystem not mounted." 1>&2
    fi

    if grep -q -w ^fuse /proc/modules
    then
        echo "${PROGRAM}: Unloading fuse (kernel) module ..."
        rmmod fuse
    fi
}

# Command line arguments

case $1 in
start)
    fuse_start
    ;;
stop)
    fuse_stop
    ;;
restart)
    fuse_stop
    fuse_start
    ;;
*)
    echo "Usage: $0 (start|stop|restart)" 1>&2
    exit 1
    ;;
esac


code:
extern void __stack_chk_fail(void);
void __attribute__((visibility ("hidden"))) __stack_chk_fail_local(void) { __stack_chk_fail(); }


code:
#! /bin/sh -
#
# Script borrowed from Fedora, slightly adapted
# for Dragora GNU/Linux-Libre.
#
default_flag="-std=c89"

for option in "$@"
do
    case $option in
    -ansi | -std=c89 | -std=iso9899:1990 )
        default_flag=""
        ;;
    -std=*)
        echo "`basename -- "$0"` called with non ANSI/ISO C option $option" 1>&2
        exit 1
        ;;
    esac
done

exec gcc $default_flag ${1+"$@"}


code:
#! /bin/sh -
#
# Script borrowed from Fedora, slightly adapted
# for Dragora GNU/Linux-Libre.
#
default_flag="-std=c99"

for option in "$@"
do
    case $option in
    -std=c99 | -std=c9x | -std=iso9899:1999 | -std=iso9899:199x )
        default_flag=""
        ;;
    -std=*)
        echo "`basename -- "$0"` called with non ISO C99 option $option" 1>&2
        exit 1
        ;;
    esac
done

exec gcc $default_flag ${1+"$@"}


code:
# Set default warning level for Glib-based applications.
# The value of the variable is a digit that corresponds to:
#    1 Alert
#    2 Critical
#    3 Error
#    4 Warning
#    5 Notice

test -n "${GLIB_LOG_LEVEL+$GLIB_LOG_LEVEL}" || GLIB_LOG_LEVEL=4
export GLIB_LOG_LEVEL


code:
#! /bin/sh -
exec /usr/bin/grep -E "$@"

path: archive/grep/usr/bin/egrep


code:
#! /bin/sh -
exec /usr/bin/grep -F "$@"

path: archive/grep/usr/bin/fgrep


code:
#
# /etc/default/grub - Controls the operation of grub-mkconfig(8).
#
# For more information, type: info grub -n 'simple configuration'
#

# The default menu entry.  This may be a number, in which case it
# identifies the Nth entry in the generated menu counted from zero,
# or the title of a menu entry, or the special string 'saved'.  Using
# the id may be useful if you want to set a menu entry as the default
# even though there may be a variable number of entries before it
GRUB_DEFAULT=0

# Command-line arguments to add to menu entries for the Linux kernel
#
# Note: The arguments are added to both entries (normal and recovery).
GRUB_CMDLINE_LINUX="printk.time=0 nomodeset"

# If this option is set to 'true', disable the generation of recovery
# mode menu entries.
#GRUB_DISABLE_RECOVERY=true

# Unless 'GRUB_DISABLE_RECOVERY' is set to 'true', two menu entries
# will be generated for each Linux kernel: one default entry and one
# entry for recovery mode.  This option lists command-line arguments
# to add only to the default menu entry, after those listed in
# 'GRUB_CMDLINE_LINUX'
#
# Note: The entries are appended to the end of the normal mode only.
GRUB_CMDLINE_LINUX_DEFAULT=""

# Boot the default entry this many seconds after the menu is
# displayed, unless a key is pressed.  The default is '5'.  Set to
# '0' to boot immediately without displaying the menu, or to '-1' to
# wait indefinitely
GRUB_TIMEOUT=40

# If 'GRUB_TIMEOUT_STYLE' is set to 'countdown' or 'hidden', the
# timeout is instead counted before the menu is displayed
#GRUB_TIMEOUT_STYLE=countdown

# Set by distributors of GRUB to their identifying name.  This is
# used to generate more informative menu entry titles
GRUB_DISTRIBUTOR="Dragora"

# Select the terminal output device.  You may select multiple devices
# here, separated by spaces.
#
# Valid terminal output names depend on the platform, but may include
# 'console' (native platform console), 'serial' (serial terminal),
# 'serial_<port>' (serial terminal with explicit port selection),
# 'gfxterm' (graphics-mode output), 'vga_text' (VGA text output),
# 'mda_text' (MDA text output), 'morse' (Morse-coding using system
# beeper) or 'spkmodem' (simple data protocol using system speaker).
# The default is to use the platform's native terminal output.
#
# Please check the documentation for setting an output device.
#GRUB_TERMINAL="console"

# Set the resolution used on the 'gfxterm' graphical terminal.  Note
# that you can only use modes which your graphics card supports via
# VESA BIOS Extensions (VBE), so for example native LCD panel
# resolutions may not be available.  The default is 'auto', which
# tries to select a preferred resolution.
#
#   The resolution may be specified as a sequence of one or more modes,
# separated by commas (',') or semicolons (';'); each will be tried in
# turn until one is found.  Each mode should be either 'auto',
# 'WIDTHxHEIGHT', or 'WIDTHxHEIGHTxDEPTH'.
#GRUB_GFXMODE=640x480

# To detect other bootable partitions via os-prober
GRUB_DISABLE_OS_PROBER=false

path: archive/grub/etc/default/grub


code:
/media:  Mount point for removeable media.

  This directory contains subdirectories which are used as mount points
for removeable media such as floppy disks, cdroms and zip disks.

See also the file README in the /mnt directory.


code:
/mnt:  Mount point for a temporarily mounted filesystem.

  This directory is provided so that the system administrator may
temporarily mount a filesystem as needed.  The content of this
directory is a local issue and should not affect the manner in
which any program is run.

  This directory must not be used by installation programs:
a suitable temporary directory not in use by the system
must be used instead.

See also the file README in the /media directory.


code:
#
# /etc/inetd.conf - Internet super-server configuration.
#
# This one is a minimal configuration for the services that we provide.
#
# For a complete overview and configuration of inetd(8), type:
# info inetutils 'inetd invocation'
#

#echo   	stream	tcp	nowait	root	internal
#echo   	dgram	udp	wait	root	internal
#discard	stream	tcp	nowait	root	internal
#discard	dgram	udp	wait	root	internal
#daytime	stream	tcp	nowait	root	internal
#daytime	dgram	udp	wait	root	internal
#chargen	stream	tcp	nowait	root	internal
#chargen	dgram	udp	wait	root	internal
#time		stream	tcp	nowait	root	internal
#time		dgram	udp	wait	root	internal

# Remote execution daemon
#exec		stream	tcp	nowait	root	/usr/sbin/tcpd	/usr/libexec/rexecd -l

# File transfer protocol daemon
#ftp		stream	tcp	nowait	root	/usr/sbin/tcpd	/usr/libexec/ftpd -l -a

# DARPA telnet protocol server
#telnet		stream	tcp	nowait	root	/usr/sbin/tcpd	/usr/libexec/telnetd --no-hostinfo

# Tftp service is provided primarily for booting.  Most sites
# run this only on machines acting as "boot servers." Do not uncomment
# this unless you *need* it.
#tftp		dgram	udp	wait	root	/usr/sbin/tcpd	/usr/libexec/tftpd -l


code:
#! /bin/sh -
#
# Generic perpetrate(5) runscript for inetd.
#

if test "$1" = start
then
    exec tinylog_run "$2"
fi


code:
#! /bin/sh -
#
# inetd/rc.main
#
# Internet super-server.
#

# Redirects the standard error to the standard output
exec 2>&1

TARGET="$1"
SVNAME="${2:-inetd}"

start()
{
    echo "*** ${SVNAME}: Starting inetd ..."
    exec /usr/libexec/inetd -d --pidfile=/var/run /etc/inetd.conf
}

reset()
{
    case $3 in
    exit)
        echo "*** ${SVNAME}: Exited status $4"
        ;;
    signal)
        echo "*** ${SVNAME}: Killed on signal $5"
        ;;
    *)
        echo "*** ${SVNAME}: Stopped (${3})"
        ;;
    esac
}

# Branch to target
eval ${TARGET} "$@"


code:
                               02Dragora
                       04https://www.dragora.org07

BOOT PARAMETERS

The following variables are boot parameters for the live system startup.
Any parameters given on the command line will only be valid for the
temporary (current) session.

Defaults for the options are specified in brackets.

RC_HWCLOCK=08.......... 07Hardware clock timescale, 03utc07 or 03localtime07 [03utc07]
RC_HOSTNAME=08......... 07System host name [03dragora07]
RC_DOMAINNAME=08....... 07System domain name [03example.net07]
RC_ESPEAKUP=08......... 07Use 03on07 to enable eSpeakup (software synthesizer) [03off07]
RC_ESPEAKUP_VOICE=08... 07Voice for the software synthesizer [03default07]
RC_KEYMAP=08........... 07Keyboard map for the console [03qwerty/us07]
RC_BLANKTIME=08........ 07Terminal screen blanking in minutes [031507]

... press [Enter] or [Esc] to return.


code:
UI vesamenu.c32
PROMPT 0

TIMEOUT 3000
TOTALTIMEOUT 4000

MENU RESOLUTION 640 480
MENU BACKGROUND dsplash.jpg
MENU TITLE Boot Menu
MENU MARGIN 16
MENU ROWS 6
MENU VSHIFT 4
MENU TIMEOUTROW 13
MENU HELPMSGROW 16
MENU TABMSG
MENU COLOR screen	0  #10460a #00000000 std
MENU COLOR border	0  #b26818 #00000000 std
MENU COLOR title	0  #1fb251 #00000000 std
MENU COLOR sel		30 #00000003 #18b218 std
MENU COLOR hotsel	0  #ffffffff #18b218 std
MENU COLOR hotkey	0  #b26818 #00000000 std
MENU COLOR help		0  #fad900 #00000000 std
MENU CLEAR

F1 f1.msg #10460a
DEFAULT live
NOCOMPLETE 1

LABEL live
    MENU LABEL ^Boot Dragora Live
    MENU DEFAULT
    KERNEL vmlinuz
    APPEND initrd=initrd.img rw printk.time=0 nomodeset
    TEXT HELP
    Use the 'Up' and 'Down' keys to select which entry is highlighted.
    Press [Enter] to boot the selected entry, [Tab] to edit command-
    line parameters before booting.  Press [F1] for more information.
    ENDTEXT

LABEL install
    MENU LABEL ^Install Dragora
    MENU DEFAULT
    KERNEL vmlinuz
    APPEND initrd=initrd.img rw printk.time=0 DRAGORA_SETUP nomodeset
    TEXT HELP
    This will invoke the tools to configure the keymap, mouse and then
    run the Dragora installer for you.
    ENDTEXT

MENU SEPARATOR

LABEL prompt
    MENU LABEL ^Exit to the boot prompt
    TEXT HELP
    Command line parameters must be prepended using a label, by default
    "dragora".  For example, to bail out to a Linux partition you could
    type: dragora root=/dev/sda1 rdinit= ro
    ENDTEXT
    MENU QUIT