Rewrite the core parts in C. We now provide librc so other programs can
query runlevels, services and state without using bash. We also provide libeinfo so other programs can easily use our informational functions. As such, we have dropped the requirement of using bash as the init script shell. We now use /bin/sh and have strived to make the scripts as portable as possible. Shells that work are bash and dash. busybox works provided you disable s-s-d. If you have WIPE_TMP set to yes in conf.d/bootmisc you should disable find too. zsh and ksh do not work at this time. Networking support is currently being re-vamped also as it was heavily bash array based. As such, a new config format is available like so config_eth0="1.2.3.4/24 5.6.7.8/16" or like so config_eth0="'1.2.3.4 netmask 255.255.255.0' '5.6.7.8 netmask 255.255.0.0'" We will still support the old bash array format provided that /bin/sh IS a link it bash. ChangeLog for baselayout-1 can be found in our SVN repo.
This commit is contained in:
7
etc/Makefile
Normal file
7
etc/Makefile
Normal file
@@ -0,0 +1,7 @@
|
||||
SUBDIRS = env.d
|
||||
|
||||
DIR = /etc
|
||||
FILES = hosts networks profile protocols rc.conf services shells
|
||||
|
||||
TOPDIR = ..
|
||||
include $(TOPDIR)/default.mk
|
10
etc/env.d/00basic
Normal file
10
etc/env.d/00basic
Normal file
@@ -0,0 +1,10 @@
|
||||
# /etc/env.d/00basic
|
||||
|
||||
PATH="/opt/bin"
|
||||
ROOTPATH="/opt/bin"
|
||||
LDPATH="/usr/local/lib"
|
||||
MANPATH="/usr/local/share/man:/usr/share/man"
|
||||
INFOPATH="/usr/share/info"
|
||||
CVS_RSH="ssh"
|
||||
PAGER="/usr/bin/less"
|
||||
LESSOPEN="|lesspipe.sh %s"
|
5
etc/env.d/Makefile
Normal file
5
etc/env.d/Makefile
Normal file
@@ -0,0 +1,5 @@
|
||||
DIR = /etc/env.d
|
||||
FILES = 00basic
|
||||
|
||||
TOPDIR = ../..
|
||||
include $(TOPDIR)/default.mk
|
31
etc/hosts
Normal file
31
etc/hosts
Normal file
@@ -0,0 +1,31 @@
|
||||
# /etc/hosts: Local Host Database
|
||||
#
|
||||
# This file describes a number of aliases-to-address mappings for the for
|
||||
# local hosts that share this file.
|
||||
#
|
||||
# In the presence of the domain name service or NIS, this file may not be
|
||||
# consulted at all; see /etc/host.conf for the resolution order.
|
||||
#
|
||||
|
||||
# IPv4 and IPv6 localhost aliases
|
||||
127.0.0.1 localhost
|
||||
::1 localhost
|
||||
|
||||
#
|
||||
# Imaginary network.
|
||||
#10.0.0.2 myname
|
||||
#10.0.0.3 myfriend
|
||||
#
|
||||
# According to RFC 1918, you can use the following IP networks for private
|
||||
# nets which will never be connected to the Internet:
|
||||
#
|
||||
# 10.0.0.0 - 10.255.255.255
|
||||
# 172.16.0.0 - 172.31.255.255
|
||||
# 192.168.0.0 - 192.168.255.255
|
||||
#
|
||||
# In case you want to be able to connect directly to the Internet (i.e. not
|
||||
# behind a NAT, ADSL router, etc...), you need real official assigned
|
||||
# numbers. Do not try to invent your own network numbers but instead get one
|
||||
# from your network provider (if any) or from your regional registry (ARIN,
|
||||
# APNIC, LACNIC, RIPE NCC, or AfriNIC.)
|
||||
#
|
8
etc/networks
Normal file
8
etc/networks
Normal file
@@ -0,0 +1,8 @@
|
||||
# /etc/networks
|
||||
#
|
||||
# This file describes a number of netname-to-adress
|
||||
# mappings for the TCP/IP subsytem. It is mostly
|
||||
# used at boot time, when no name servers are running.
|
||||
#
|
||||
|
||||
loopback 127.0.0.0
|
67
etc/profile
Normal file
67
etc/profile
Normal file
@@ -0,0 +1,67 @@
|
||||
# /etc/profile: login shell setup
|
||||
#
|
||||
# That this file is used by any Bourne-shell derivative to setup the
|
||||
# environment for login shells.
|
||||
#
|
||||
|
||||
# Load environment settings from profile.env, which is created by
|
||||
# env-update from the files in /etc/env.d
|
||||
if [ -e /etc/profile.env ] ; then
|
||||
. /etc/profile.env
|
||||
fi
|
||||
|
||||
# 077 would be more secure, but 022 is generally quite realistic
|
||||
umask 022
|
||||
|
||||
# Set up PATH depending on whether we're root or a normal user.
|
||||
# There's no real reason to exclude sbin paths from the normal user,
|
||||
# but it can make tab-completion easier when they aren't in the
|
||||
# user's PATH to pollute the executable namespace.
|
||||
#
|
||||
# It is intentional in the following line to use || instead of -o.
|
||||
# This way the evaluation can be short-circuited and calling whoami is
|
||||
# avoided.
|
||||
if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then
|
||||
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOTPATH}"
|
||||
else
|
||||
PATH="/usr/local/bin:/usr/bin:/bin:${PATH}"
|
||||
fi
|
||||
export PATH
|
||||
unset ROOTPATH
|
||||
|
||||
# Extract the value of EDITOR
|
||||
[ -z "$EDITOR" ] && EDITOR="`. /etc/rc.conf 2>/dev/null; echo $EDITOR`"
|
||||
[ -z "$EDITOR" ] && EDITOR="/bin/nano"
|
||||
export EDITOR
|
||||
|
||||
if [ -n "${BASH_VERSION}" ] ; then
|
||||
# Newer bash ebuilds include /etc/bash/bashrc which will setup PS1
|
||||
# including color. We leave out color here because not all
|
||||
# terminals support it.
|
||||
if [ -f /etc/bash/bashrc ] ; then
|
||||
# Bash login shells run only /etc/profile
|
||||
# Bash non-login shells run only /etc/bash/bashrc
|
||||
# Since we want to run /etc/bash/bashrc regardless, we source it
|
||||
# from here. It is unfortunate that there is no way to do
|
||||
# this *after* the user's .bash_profile runs (without putting
|
||||
# it in the user's dot-files), but it shouldn't make any
|
||||
# difference.
|
||||
. /etc/bash/bashrc
|
||||
else
|
||||
PS1='\u@\h \w \$ '
|
||||
fi
|
||||
else
|
||||
# Setup a bland default prompt. Since this prompt should be useable
|
||||
# on color and non-color terminals, as well as shells that don't
|
||||
# understand sequences such as \h, don't put anything special in it.
|
||||
if type whoami >/dev/null 2>/dev/null && \
|
||||
type cut >/dev/null 2>/dev/null && \
|
||||
type uname >/dev/null 2>/dev/null ; then
|
||||
PS1="`whoami`@`uname -n | cut -f1 -d.` \$ "
|
||||
fi
|
||||
fi
|
||||
|
||||
for sh in /etc/profile.d/*.sh ; do
|
||||
[ -r "$sh" ] && . "$sh"
|
||||
done
|
||||
unset sh
|
147
etc/protocols
Normal file
147
etc/protocols
Normal file
@@ -0,0 +1,147 @@
|
||||
#
|
||||
# Internet protocols
|
||||
#
|
||||
# $FreeBSD: src/etc/protocols,v 1.20 2005/02/22 13:04:02 glebius Exp $
|
||||
# from: @(#)protocols 5.1 (Berkeley) 4/17/89
|
||||
#
|
||||
# See also http://www.iana.org/assignments/protocol-numbers
|
||||
#
|
||||
ip 0 IP # internet protocol, pseudo protocol number
|
||||
#hopopt 0 HOPOPT # hop-by-hop options for ipv6
|
||||
icmp 1 ICMP # internet control message protocol
|
||||
igmp 2 IGMP # internet group management protocol
|
||||
ggp 3 GGP # gateway-gateway protocol
|
||||
ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'')
|
||||
st2 5 ST2 # ST2 datagram mode (RFC 1819)
|
||||
tcp 6 TCP # transmission control protocol
|
||||
cbt 7 CBT # CBT, Tony Ballardie <A.Ballardie@cs.ucl.ac.uk>
|
||||
egp 8 EGP # exterior gateway protocol
|
||||
igp 9 IGP # any private interior gateway (Cisco: for IGRP)
|
||||
bbn-rcc 10 BBN-RCC-MON # BBN RCC Monitoring
|
||||
nvp 11 NVP-II # Network Voice Protocol
|
||||
pup 12 PUP # PARC universal packet protocol
|
||||
argus 13 ARGUS # ARGUS
|
||||
emcon 14 EMCON # EMCON
|
||||
xnet 15 XNET # Cross Net Debugger
|
||||
chaos 16 CHAOS # Chaos
|
||||
udp 17 UDP # user datagram protocol
|
||||
mux 18 MUX # Multiplexing protocol
|
||||
dcn 19 DCN-MEAS # DCN Measurement Subsystems
|
||||
hmp 20 HMP # host monitoring protocol
|
||||
prm 21 PRM # packet radio measurement protocol
|
||||
xns-idp 22 XNS-IDP # Xerox NS IDP
|
||||
trunk-1 23 TRUNK-1 # Trunk-1
|
||||
trunk-2 24 TRUNK-2 # Trunk-2
|
||||
leaf-1 25 LEAF-1 # Leaf-1
|
||||
leaf-2 26 LEAF-2 # Leaf-2
|
||||
rdp 27 RDP # "reliable datagram" protocol
|
||||
irtp 28 IRTP # Internet Reliable Transaction Protocol
|
||||
iso-tp4 29 ISO-TP4 # ISO Transport Protocol Class 4
|
||||
netblt 30 NETBLT # Bulk Data Transfer Protocol
|
||||
mfe-nsp 31 MFE-NSP # MFE Network Services Protocol
|
||||
merit-inp 32 MERIT-INP # MERIT Internodal Protocol
|
||||
sep 33 SEP # Sequential Exchange Protocol
|
||||
3pc 34 3PC # Third Party Connect Protocol
|
||||
idpr 35 IDPR # Inter-Domain Policy Routing Protocol
|
||||
xtp 36 XTP # Xpress Tranfer Protocol
|
||||
ddp 37 DDP # Datagram Delivery Protocol
|
||||
idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport Proto
|
||||
tp++ 39 TP++ # TP++ Transport Protocol
|
||||
il 40 IL # IL Transport Protocol
|
||||
ipv6 41 IPV6 # ipv6
|
||||
sdrp 42 SDRP # Source Demand Routing Protocol
|
||||
ipv6-route 43 IPV6-ROUTE # routing header for ipv6
|
||||
ipv6-frag 44 IPV6-FRAG # fragment header for ipv6
|
||||
idrp 45 IDRP # Inter-Domain Routing Protocol
|
||||
rsvp 46 RSVP # Resource ReSerVation Protocol
|
||||
gre 47 GRE # Generic Routing Encapsulation
|
||||
mhrp 48 MHRP # Mobile Host Routing Protocol
|
||||
bna 49 BNA # BNA
|
||||
esp 50 ESP # encapsulating security payload
|
||||
ah 51 AH # authentication header
|
||||
i-nlsp 52 I-NLSP # Integrated Net Layer Security TUBA
|
||||
swipe 53 SWIPE # IP with Encryption
|
||||
narp 54 NARP # NBMA Address Resolution Protocol
|
||||
mobile 55 MOBILE # IP Mobility
|
||||
tlsp 56 TLSP # Transport Layer Security Protocol
|
||||
skip 57 SKIP # SKIP
|
||||
ipv6-icmp 58 IPV6-ICMP icmp6 # ICMP for IPv6
|
||||
ipv6-nonxt 59 IPV6-NONXT # no next header for ipv6
|
||||
ipv6-opts 60 IPV6-OPTS # destination options for ipv6
|
||||
# 61 # any host internal protocol
|
||||
cftp 62 CFTP # CFTP
|
||||
# 63 # any local network
|
||||
sat-expak 64 SAT-EXPAK # SATNET and Backroom EXPAK
|
||||
kryptolan 65 KRYPTOLAN # Kryptolan
|
||||
rvd 66 RVD # MIT Remote Virtual Disk Protocol
|
||||
ippc 67 IPPC # Internet Pluribus Packet Core
|
||||
# 68 # any distributed filesystem
|
||||
sat-mon 69 SAT-MON # SATNET Monitoring
|
||||
visa 70 VISA # VISA Protocol
|
||||
ipcv 71 IPCV # Internet Packet Core Utility
|
||||
cpnx 72 CPNX # Computer Protocol Network Executive
|
||||
cphb 73 CPHB # Computer Protocol Heart Beat
|
||||
wsn 74 WSN # Wang Span Network
|
||||
pvp 75 PVP # Packet Video Protocol
|
||||
br-sat-mon 76 BR-SAT-MON # Backroom SATNET Monitoring
|
||||
sun-nd 77 SUN-ND # SUN ND PROTOCOL-Temporary
|
||||
wb-mon 78 WB-MON # WIDEBAND Monitoring
|
||||
wb-expak 79 WB-EXPAK # WIDEBAND EXPAK
|
||||
iso-ip 80 ISO-IP # ISO Internet Protocol
|
||||
vmtp 81 VMTP # Versatile Message Transport
|
||||
secure-vmtp 82 SECURE-VMTP # SECURE-VMTP
|
||||
vines 83 VINES # VINES
|
||||
ttp 84 TTP # TTP
|
||||
nsfnet-igp 85 NSFNET-IGP # NSFNET-IGP
|
||||
dgp 86 DGP # Dissimilar Gateway Protocol
|
||||
tcf 87 TCF # TCF
|
||||
eigrp 88 EIGRP # Enhanced Interior Routing Protocol (Cisco)
|
||||
ospf 89 OSPFIGP # Open Shortest Path First IGP
|
||||
sprite-rpc 90 Sprite-RPC # Sprite RPC Protocol
|
||||
larp 91 LARP # Locus Address Resolution Protocol
|
||||
mtp 92 MTP # Multicast Transport Protocol
|
||||
ax.25 93 AX.25 # AX.25 Frames
|
||||
ipip 94 IPIP # Yet Another IP encapsulation
|
||||
micp 95 MICP # Mobile Internetworking Control Pro.
|
||||
scc-sp 96 SCC-SP # Semaphore Communications Sec. Pro.
|
||||
etherip 97 ETHERIP # Ethernet-within-IP Encapsulation
|
||||
encap 98 ENCAP # Yet Another IP encapsulation
|
||||
# 99 # any private encryption scheme
|
||||
gmtp 100 GMTP # GMTP
|
||||
ifmp 101 IFMP # Ipsilon Flow Management Protocol
|
||||
pnni 102 PNNI # PNNI over IP
|
||||
pim 103 PIM # Protocol Independent Multicast
|
||||
aris 104 ARIS # ARIS
|
||||
scps 105 SCPS # SCPS
|
||||
qnx 106 QNX # QNX
|
||||
a/n 107 A/N # Active Networks
|
||||
ipcomp 108 IPComp # IP Payload Compression Protocol
|
||||
snp 109 SNP # Sitara Networks Protocol
|
||||
compaq-peer 110 Compaq-Peer # Compaq Peer Protocol
|
||||
ipx-in-ip 111 IPX-in-IP # IPX in IP
|
||||
carp 112 CARP vrrp # Common Address Redundancy Protocol
|
||||
pgm 113 PGM # PGM Reliable Transport Protocol
|
||||
# 114 # any 0-hop protocol
|
||||
l2tp 115 L2TP # Layer Two Tunneling Protocol
|
||||
ddx 116 DDX # D-II Data Exchange
|
||||
iatp 117 IATP # Interactive Agent Transfer Protocol
|
||||
st 118 ST # Schedule Transfer
|
||||
srp 119 SRP # SpectraLink Radio Protocol
|
||||
uti 120 UTI # UTI
|
||||
smp 121 SMP # Simple Message Protocol
|
||||
sm 122 SM # SM
|
||||
ptp 123 PTP # Performance Transparency Protocol
|
||||
isis 124 ISIS # ISIS over IPv4
|
||||
fire 125 FIRE
|
||||
crtp 126 CRTP # Combat Radio Transport Protocol
|
||||
crudp 127 CRUDP # Combat Radio User Datagram
|
||||
sscopmce 128 SSCOPMCE
|
||||
iplt 129 IPLT
|
||||
sps 130 SPS # Secure Packet Shield
|
||||
pipe 131 PIPE # Private IP Encapsulation within IP
|
||||
sctp 132 SCTP # Stream Control Transmission Protocol
|
||||
fc 133 FC # Fibre Channel
|
||||
# 134-254 # Unassigned
|
||||
pfsync 240 PFSYNC # PF Synchronization
|
||||
# 255 # Reserved
|
||||
divert 258 DIVERT # Divert pseudo-protocol [non IANA]
|
37
etc/rc.conf
Normal file
37
etc/rc.conf
Normal file
@@ -0,0 +1,37 @@
|
||||
# /etc/rc.conf: Global startup script configuration settings
|
||||
|
||||
# UNICODE specifies whether you want to have UNICODE support in the console.
|
||||
# If you set to yes, please make sure to set a UNICODE aware CONSOLEFONT and
|
||||
# KEYMAP in the /etc/conf.d/consolefont and /etc/conf.d/keymaps config files.
|
||||
|
||||
UNICODE="no"
|
||||
|
||||
# Set EDITOR to your preferred editor.
|
||||
# You may use something other than what is listed here.
|
||||
|
||||
EDITOR="/bin/nano"
|
||||
#EDITOR="/usr/bin/vim"
|
||||
#EDITOR="/usr/bin/emacs"
|
||||
|
||||
# XSESSION is a new variable to control what window manager to start
|
||||
# default with X if run with xdm, startx or xinit. The default behavior
|
||||
# is to look in /etc/X11/Sessions/ and run the script in matching the
|
||||
# value that XSESSION is set to. The support scripts are smart enough to
|
||||
# look in all bin directories if it cant find a match in /etc/X11/Sessions/,
|
||||
# so setting it to "enlightenment" can also work. This is basically used
|
||||
# as a way for the system admin to configure a default system wide WM,
|
||||
# allthough it will work if the user export XSESSION in his .bash_profile, etc.
|
||||
#
|
||||
# NOTE: 1) this behaviour is overridden when a ~/.xinitrc exists, and startx
|
||||
# is called.
|
||||
# 2) even if ~/.xsession exists, if XSESSION can be resolved, it will
|
||||
# be executed rather than ~/.xsession, else KDM breaks ...
|
||||
#
|
||||
# Defaults depending on what you install currently include:
|
||||
#
|
||||
# Gnome - will start gnome-session
|
||||
# kde-<version> - will start startkde (look in /etc/X11/Sessions/)
|
||||
# Xsession - will start a terminal and a few other nice apps
|
||||
# Xfce4 - will start a XFCE4 session
|
||||
|
||||
#XSESSION="Gnome"
|
1178
etc/services
Normal file
1178
etc/services
Normal file
File diff suppressed because it is too large
Load Diff
10
etc/shells
Normal file
10
etc/shells
Normal file
@@ -0,0 +1,10 @@
|
||||
# /etc/shells: valid login shells
|
||||
/bin/bash
|
||||
/bin/csh
|
||||
/bin/esh
|
||||
/bin/fish
|
||||
/bin/ksh
|
||||
/bin/sash
|
||||
/bin/sh
|
||||
/bin/tcsh
|
||||
/bin/zsh
|
Reference in New Issue
Block a user