sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (a53a84ef20177cc8a4c39c99f52b73c1b3ff5155)
- From: Pavel Vinogradov <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (a53a84ef20177cc8a4c39c99f52b73c1b3ff5155)
- Date: Tue, 17 Feb 2015 02:16:30 -0600
GIT changes to master grimoire by Pavel Vinogradov <public AT sourcemage.org>:
ChangeLog | 3
smgl/epoch/BUILD | 19 ++
smgl/epoch/CONFLICTS | 3
smgl/epoch/DEPENDS | 1
smgl/epoch/DETAILS | 32 +++
smgl/epoch/HISTORY | 3
smgl/epoch/INSTALL | 12 +
smgl/epoch/PROVIDES | 1
smgl/epoch/epoch.conf | 332
++++++++++++++++++++++++++++++++++++++
smgl/epoch/scripts/keymapstart.sh | 44 +++++
smgl/epoch/scripts/keymapstop.sh | 24 ++
smgl/epoch/scripts/mountruntmp.sh | 15 +
smgl/epoch/scripts/udev.sh | 68 +++++++
13 files changed, 557 insertions(+)
New commits:
commit a53a84ef20177cc8a4c39c99f52b73c1b3ff5155
Author: Pavel Vinogradov <public AT sourcemage.org>
Commit: Pavel Vinogradov <public AT sourcemage.org>
smgl/epoch: new spell, The Epoch Init System
diff --git a/ChangeLog b/ChangeLog
index 573af47..b270b8b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2015-02-17 Pavel Vinogradov <public AT sourcemage.org>
+ *~smgl/epoch: new spell, The Epoch Init System
+
2015-02-13 Ismael Luceno <ismael AT sourcemage.org>
* editors/vche: new spell, hex editor
diff --git a/smgl/epoch/BUILD b/smgl/epoch/BUILD
new file mode 100755
index 0000000..6fe9f3a
--- /dev/null
+++ b/smgl/epoch/BUILD
@@ -0,0 +1,19 @@
+rm -r -f objects sbin &&
+mkdir -p objects sbin &&
+
+cd objects &&
+if [ -z $CC ]; then
+ CC=gcc
+fi &&
+$CC $CFLAGS -c ../src/actions.c &&
+$CC $CFLAGS -c ../src/config.c &&
+$CC $CFLAGS -c ../src/console.c &&
+$CC $CFLAGS -c ../src/main.c &&
+$CC $CFLAGS -c ../src/membus.c &&
+$CC $CFLAGS -c ../src/modes.c &&
+$CC $CFLAGS -c ../src/parse.c &&
+$CC $CFLAGS -c ../src/utilfuncs.c &&
+
+$CC $CFLAGS -o ../sbin/epoch \
+ actions.o config.o console.o main.o membus.o modes.o parse.o utilfuncs.o \
+ $LDFLAGS
diff --git a/smgl/epoch/CONFLICTS b/smgl/epoch/CONFLICTS
new file mode 100755
index 0000000..ac4d439
--- /dev/null
+++ b/smgl/epoch/CONFLICTS
@@ -0,0 +1,3 @@
+conflicts upstart &&
+conflicts initng &&
+conflicts simpleinit-msb
diff --git a/smgl/epoch/DEPENDS b/smgl/epoch/DEPENDS
new file mode 100755
index 0000000..35bb696
--- /dev/null
+++ b/smgl/epoch/DEPENDS
@@ -0,0 +1 @@
+depends smgl-fhs
diff --git a/smgl/epoch/DETAILS b/smgl/epoch/DETAILS
new file mode 100755
index 0000000..c990b71
--- /dev/null
+++ b/smgl/epoch/DETAILS
@@ -0,0 +1,32 @@
+ SPELL=epoch
+ VERSION=1.2.2
+ SOURCE="${SPELL}_${VERSION}.tar.gz"
+ SOURCE_URL[0]=http://universe2.us/${SOURCE}
+
SOURCE_HASH=sha512:9e3e38ef95c20237a3db4f47c9464f27e893a665f0692200d89e96b12f6b2e3af9b84d951356b7b354f19ea4fbe372e2e0ba406fdfeb8819914d46cfed3024a3
+SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}_${VERSION}"
+ WEB_SITE="http://universe2.us/epoch.html"
+ LICENSE[0]="PD"
+ ENTERED=20150217
+ DOCS="CHANGELOG README UNLICENSE.TXT"
+ KEYWORDS=""
+ SHORT="The Epoch Init System"
+cat << EOF
+The Epoch Init System is a small but powerful init system for Linux 2.6+.
+It requires a libc, (not glibc specific), a Linux kernel of 2.6 or greater,
+a shell is recommended, and while it will function somewhat without it,
/proc.
+It has very low memory usage, very small binary size, and is designed to be
+suitable for both full blown desktop and server systems as well as keeping
+minimalist and embedded distros heavily in mind. It is architecture and
+compiler independent, written in mostly ANSI C, and is designed with a
+philosophy in mind:
+
+1. Features that aren't our business aren't our business.
+2. Service tracking and management is the business of the init system
+3. Be unintrusive and easily replaced without a reinstall of the OS.
+4. Don't require any dependency libraries outside of libc.
+5. Be small and efficient, but not so small as to be a poor choice for
desktops
+and servers.
+6. Be easily configured and tidy with our configuration.
+7. If it's easy as well as non-costly to implement, and people wish they
could
+do that, let them do that.
+EOF
diff --git a/smgl/epoch/HISTORY b/smgl/epoch/HISTORY
new file mode 100644
index 0000000..ca92e22
--- /dev/null
+++ b/smgl/epoch/HISTORY
@@ -0,0 +1,3 @@
+2015-02-17 Pavel Vinogradov <public AT sourcemage.org>
+ *~BUILD, CONFLICTS, DEPENDS, DETAILS, epoch.conf, INSTALL,
+ PROVIDES, scripts/*: spell created
diff --git a/smgl/epoch/INSTALL b/smgl/epoch/INSTALL
new file mode 100755
index 0000000..9a450bf
--- /dev/null
+++ b/smgl/epoch/INSTALL
@@ -0,0 +1,12 @@
+mkdir -p $INSTALL_ROOT/sbin $INSTALL_ROOT/bin
$INSTALL_ROOT/etc/epoch/scripts &&
+install $SOURCE_DIRECTORY/sbin/epoch $INSTALL_ROOT/sbin &&
+for link in init halt poweroff reboot shutdown killall5; do
+ ln -s -f $INSTALL_ROOT/sbin/epoch $INSTALL_ROOT/sbin/$link
+done &&
+ln -s -f $INSTALL_ROOT/sbin/epoch $INSTALL_ROOT/bin/wall &&
+
+install_config_file $SPELL_DIRECTORY/epoch.conf \
+ $INSTALL_ROOT/etc/epoch/epoch.conf &&
+for script in $SPELL_DIRECTORY/scripts/*.sh; do
+ install -m 0755 $script $INSTALL_ROOT/etc/epoch/scripts
+done
diff --git a/smgl/epoch/PROVIDES b/smgl/epoch/PROVIDES
new file mode 100755
index 0000000..d0e366a
--- /dev/null
+++ b/smgl/epoch/PROVIDES
@@ -0,0 +1 @@
+INIT
diff --git a/smgl/epoch/epoch.conf b/smgl/epoch/epoch.conf
new file mode 100644
index 0000000..28f0119
--- /dev/null
+++ b/smgl/epoch/epoch.conf
@@ -0,0 +1,332 @@
+BootBannerText=Welcome back to Source Mage!
+BootBannerColor=GREEN
+
+Hostname=FILE /etc/hostname
+DefaultRunlevel=boot
+EnableLogging=true
+DisableCAD=true
+BlankLogOnBoot=true
+MountVirtual=procfs sysfs devpts+ devshm+
+
+#Begin object specs
+
+ObjectID=sysclock
+ ObjectDescription=Configuring system clock
+ ObjectStartCommand=hwclock -s
+ ObjectStopCommand=hwclock -w
+ ObjectStartPriority=1
+ ObjectStopPriority=2
+ ObjectEnabled=true
+ ObjectOptions=RAWDESCRIPTION
+ ObjectRunlevels=boot core
+
+ObjectID=mountruntmp
+ ObjectDescription=Mounting /run and /tmp
+ ObjectStartCommand=/etc/epoch/scripts/mountruntmp.sh
+ ObjectStopCommand=NONE
+ ObjectStartPriority=2
+ ObjectStopPriority=0
+ ObjectEnabled=true
+ ObjectOptions=RAWDESCRIPTION
+ ObjectRunlevels=boot core hurr
+
+ObjectID=rwfs
+ ObjectDescription=root filesystem read-write support
+ ObjectStartCommand=/bin/mount -o remount,rw /
+ ObjectStopCommand=/bin/mount -o remount,ro /
+ ObjectStartPriority=4
+ ObjectStopPriority=6
+ ObjectEnabled=true
+ ObjectRunlevels=boot core
+
+ObjectID=udev
+ ObjectDescription=UDev device manager
+ ObjectStartCommand=/etc/epoch/scripts/udev.sh
+ ObjectStopCommand=NONE
+ ObjectStartPriority=3
+ ObjectStopPriority=0
+ ObjectEnabled=true
+ ObjectRunlevels=boot durr
+
+ObjectID=keymap
+ ObjectDescription=Keymap
+ ObjectStartCommand=/etc/epoch/scripts/keymapstart.sh
+ ObjectStopCommand=/etc/epoch/scripts/keymapstop.sh
+ ObjectStartPriority=6
+ ObjectStopPriority=5
+ ObjectEnabled=true
+ ObjectRunlevels=boot core hurr
+
+ObjectID=network
+ ObjectDescription=networking
+ ObjectStartCommand=/sbin/ifup --force -a
+ ObjectStopCommand=/sbin/ifdown -a
+ ObjectStartPriority=5
+ ObjectStopPriority=6
+ ObjectEnabled=true
+ ObjectRunlevels=boot core
+
+ObjectID=extrafs
+ ObjectDescription=extra filesystems and swaps
+ ObjectStartCommand=mount -a && swapon -a
+ ObjectStopCommand=swapoff -a && umount -a -r -t
nodevtmpfs,notmpfs,nosysfs,noproc
+ ObjectStartPriority=5
+ ObjectStopPriority=5
+ ObjectEnabled=true
+ ObjectRunlevels=boot durr
+
+ObjectID=killall5_soft
+ ObjectDescription=Terminating all processes
+ ObjectStopCommand=killall5 -15 && sleep 2
+ ObjectStartPriority=0
+ ObjectStopPriority=3
+ ObjectEnabled=true
+ ObjectOptions=HALTONLY RAWDESCRIPTION
+
+ObjectID=killall5
+ ObjectDescription=Killing all processes
+ ObjectStopCommand=killall5 -9 && sleep 2
+ ObjectStartPriority=0
+ ObjectStopPriority=4
+ ObjectEnabled=true
+ ObjectOptions=HALTONLY RAWDESCRIPTION
+
+ObjectID=getty1
+ ObjectDescription=Getty on /dev/tty1
+ ObjectStartCommand=agetty tty1 --noclear&
+ ObjectStopCommand=NONE
+ ObjectStartPriority=18
+ ObjectStopPriority=0
+ ObjectEnabled=true
+ ObjectOptions=SERVICE AUTORESTART
+ ObjectRunlevels=boot durr core
+
+ObjectID=getty2
+ ObjectDescription=Getty on /dev/tty2
+ ObjectStartCommand=agetty tty2 --noclear&
+ ObjectStopCommand=NONE
+ ObjectStartPriority=19
+ ObjectStopPriority=0
+ ObjectEnabled=true
+ ObjectOptions=SERVICE AUTORESTART
+ ObjectRunlevels=boot durr core
+
+ObjectID=getty3
+ ObjectDescription=Getty on /dev/tty3
+ ObjectStartCommand=agetty tty3 --noclear&
+ ObjectStopCommand=NONE
+ ObjectStartPriority=19
+ ObjectStopPriority=0
+ ObjectEnabled=true
+ ObjectOptions=SERVICE AUTORESTART
+ ObjectRunlevels=boot durr core
+
+ObjectID=getty4
+ ObjectDescription=Getty on /dev/tty4
+ ObjectStartCommand=agetty tty4 --noclear&
+ ObjectStopCommand=NONE
+ ObjectStartPriority=19
+ ObjectStopPriority=0
+ ObjectEnabled=true
+ ObjectOptions=SERVICE AUTORESTART
+ ObjectRunlevels=boot durr core
+
+ObjectID=getty5
+ ObjectDescription=Getty on /dev/tty5
+ ObjectStartCommand=agetty tty5 --noclear&
+ ObjectStopCommand=NONE
+ ObjectStartPriority=19
+ ObjectStopPriority=0
+ ObjectEnabled=true
+ ObjectOptions=SERVICE AUTORESTART
+ ObjectRunlevels=boot durr core
+
+ObjectID=getty6
+ ObjectDescription=Getty on /dev/tty6
+ ObjectStartCommand=agetty tty6 --noclear&
+ ObjectStopCommand=NONE
+ ObjectStartPriority=19
+ ObjectStopPriority=0
+ ObjectEnabled=true
+ ObjectOptions=SERVICE AUTORESTART
+ ObjectRunlevels=boot durr core
+
+>!> Examples.
+ObjectID=syslog
+ ObjectDescription=syslog-ng
+ ObjectStartCommand=syslog-ng
+ #ObjectStopCommand=PIDFILE /run/syslogd.pid
+ ObjectStopCommand=PID
+ ObjectStartPriority=6
+ ObjectStopPriority=1
+ ObjectEnabled=true
+ ObjectOptions=SERVICE AUTORESTART
+ ObjectRunlevels=boot durr
+
+ObjectID=chrony
+ ObjectDescription=Chrony NTPD service
+ ObjectEnvVar=CHRONY_ARGS=-s
+ ObjectStartCommand=/usr/sbin/chronyd $CHRONY_ARGS
+ ObjectStopCommand=PIDFILE /run/chronyd.pid
+ ObjectStartPriority=7
+ ObjectStopPriority=1
+ ObjectEnabled=true
+ ObjectOptions=SERVICE AUTORESTART
+ ObjectRunlevels=boot durr
+
+ObjectID=dbus
+ ObjectDescription=DBus
+ ObjectStartCommand=mkdir -p /run/dbus && dbus-uuidgen --ensure &&
dbus-daemon --system
+ ObjectStopCommand=PIDFILE /run/dbus/pid
+ ObjectStartPriority=7
+ ObjectStopPriority=1
+ ObjectEnabled=true
+ ObjectOptions=SERVICE
+ ObjectRunlevels=boot durr
+
+ObjectID=nscd
+ ObjectDescription=Name Service Cache Daemon
+ ObjectEnvVar=NTHREADS=4
+ ObjectEnvVar=TABLES=passwd group hosts services
+ ObjectPrestartCommand=mkdir -p /var/run/nscd /var/cache/nscd
+ ObjectStartCommand=/usr/sbin/nscd --config-file=/etc/nscd.conf
--nthreads=${NTHREADS:=4}
+ ObjectStopCommand=/usr/sbin/nscd --shutdown
+ ObjectReloadCommand=for table in $TABLES; do /usr/sbin/nscd
--invalidate $table; done
+ ObjectStartPriority=7
+ ObjectStopPriority=1
+ ObjectEnabled=true
+ ObjectOptions=SERVICE
+ ObjectRunlevels=boot durr
+
+ObjectID=alsa-state
+ ObjectDescription=ALSA settings
+ ObjectEnvVar=ASOUNDCFG=/etc/asound.state
+ ObjectStartCommand=/usr/sbin/alsactl -F -f $ASOUNDCFG restore
+ ObjectStopCommand=/usr/sbin/alsactl -f $ASOUNDCFG store &&
/usr/bin/amixer set Master mute >/dev/null 2>&1
+ ObjectStartPriority=6
+ ObjectStopPriority=1
+ ObjectEnabled=true
+ ObjectRunlevels=boot durr
+
+ObjectID=mpd
+ ObjectDescription=Music Player Daemon
+ ObjectStartCommand=/usr/bin/mpd /etc/sysconfig/mpd
+ ObjectStopCommand=PIDFILE /run/mpd
+ ObjectUser=musicdaemon
+ ObjectGroup=audio
+ ObjectStartPriority=7
+ ObjectStopPriority=1
+ ObjectEnabled=true
+ ObjectOptions=SERVICE
+ ObjectRunlevels=boot durr
+
+ObjectID=minidlna
+ ObjectDescription=MiniDLNA Server
+ ObjectStartCommand=/usr/sbin/minidlnad -f /etc/minidlna.conf
+ ObjectStopCommand=PIDFILE /run/minidlna/minidlna.pid
+ ObjectStartPriority=7
+ ObjectStopPriority=1
+ ObjectEnabled=true
+ ObjectOptions=SERVICE
+ ObjectRunlevels=boot durr
+
+ObjectID=watchdog
+ ObjectDescription=Watchdog
+ ObjectEnvVar=WD_OPTS=-b -v
+ ObjectStartCommand=/usr/sbin/watchdog $WD_OPTS
+ ObjectStopCommand=PIDFILE /run/watchdog.pid
+ ObjectStartPriority=7
+ ObjectStopPriority=1
+ ObjectEnabled=true
+ ObjectOptions=SERVICE
+ ObjectRunlevels=boot durr
+
+ObjectID=slim
+ ObjectDescription=Simple Login Manager
+ ObjectStartCommand=/usr/bin/slim -d
+ ObjectStopCommand=PID
+ ObjectStartPriority=8
+ ObjectStopPriority=1
+ ObjectEnabled=true
+ ObjectOptions=SERVICE
+ ObjectRunlevels=boot gui
+
+ObjectID=klogd
+ ObjectDescription=klogd
+ ObjectStartCommand=klogd
+ ObjectStopCommand=PID
+ ObjectStartPriority=7
+ ObjectStopPriority=1
+ ObjectOptions=SERVICE AUTORESTART
+ ObjectEnabled=true
+ ObjectRunlevels=boot
+
+ObjectID=crond
+ ObjectDescription=crond
+ ObjectStartCommand=crond
+ ObjectStopCommand=PIDFILE /run/crond.pid
+ ObjectStartPriority=7
+ ObjectStopPriority=1
+ ObjectOptions=SERVICE AUTORESTART
+ ObjectEnabled=true
+ ObjectRunlevels=boot durr
+
+ObjectID=sshd
+ ObjectDescription=SSHD
+ ObjectStartCommand=/usr/sbin/sshd
+ ObjectStopCommand=PIDFILE /run/sshd.pid
+ ObjectStartPriority=7
+ ObjectStopPriority=1
+ ObjectEnabled=false
+ ObjectRunlevels=boot
+ ObjectOptions=SERVICE AUTORESTART
+
+ObjectID=ntpd
+ ObjectDescription=NTPD service
+ ObjectStartCommand=/usr/sbin/ntpd
+ ObjectStopCommand=PID
+ ObjectStartPriority=7
+ ObjectStopPriority=1
+ ObjectEnabled=true
+ ObjectOptions=SERVICE AUTORESTART
+ ObjectRunlevels=boot durr
+
+ObjectID=gpm
+ ObjectDescription=GPM Mouse Server
+ ObjectStartCommand=gpm -m /dev/input/mice -t imps2
+ ObjectStopCommand=PIDFILE /run/gpm.pid
+ ObjectStartPriority=7
+ ObjectStopPriority=1
+ ObjectEnabled=true
+ ObjectOptions=SERVICE AUTORESTART
+ ObjectRunlevels=boot durr
+
+ObjectID=dbus
+ ObjectDescription=DBus
+ ObjectStartCommand=mkdir /var/run/dbus && dbus-uuidgen --ensure &&
dbus-daemon --system
+ ObjectStopCommand=PIDFILE /run/messagebus.pid
+ ObjectStartPriority=7
+ ObjectStopPriority=1
+ ObjectEnabled=true
+ ObjectOptions=SERVICE
+ ObjectRunlevels=boot durr
+
+ObjectID=plymouthquit
+ ObjectDescription=Stopping Plymouth boot splash
+ ObjectStartCommand=/usr/bin/plymouth quit
+ ObjectStopCommand=NONE
+ ObjectStartPriority=17
+ ObjectStopPriority=0
+ ObjectEnabled=false
+ ObjectRunlevels=boot core
+ ObjectOptions=RAWDESCRIPTION
+
+ObjectID=networkmanager
+ ObjectDescription=NetworkManager
+ ObjectStartCommand=NetworkManager --log-level=ERR
+ ObjectStopCommand=PIDFILE /run/NetworkManager/NetworkManager.pid
+ ObjectStartPriority=16
+ ObjectEnabled=true
+ ObjectRunlevels=boot core
+ ObjectOptions=SERVICE
+<!<
diff --git a/smgl/epoch/scripts/keymapstart.sh
b/smgl/epoch/scripts/keymapstart.sh
new file mode 100755
index 0000000..397a178
--- /dev/null
+++ b/smgl/epoch/scripts/keymapstart.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+. /etc/sysconfig/keymap
+. /etc/sysconfig/devices
+
+dropfile=/var/tmp/keymap.drop
+
+ if [[ "$KEYMAP" ]]; then
+ /bin/loadkeys $KEYMAP 2>&1
+ fi
+
+ for a in $INCLUDEMAPS; do
+ [[ $(find /usr/share/kbd/keymaps/ -type f -name "$a.inc*" 2>/dev/null)
]] &&
+ [[ ! $(find /usr/share/kbd/keymaps/ -type f -name "$a.map*" 2>/dev/null)
]] &&
+ a="$a.inc"
+ /bin/loadkeys $a 2>&1
+ done
+
+ [[ "$DEVICES" == "devfs" ]] && DEV_TTY="vc/" || DEV_TTY="tty"
+
+ if [[ "$UNICODE_START" ]]; then
+ /bin/kbd_mode -u
+ /bin/dumpkeys | /bin/loadkeys --unicode
+ fi
+
+ if [[ "$TTY_NUMS" == '*' ]]; then
+ TTY_NUMS=
+ for a in $(grep ^tty.*: /etc/inittab); do
+ TTY_NUMS="$TTY_NUMS $(expr "$a" : 'tty\([0-9]*\):.*')"
+ done
+ fi
+
+ for n in $TTY_NUMS; do
+ [[ "$UNICODE_START" ]] && /bin/echo -ne "\033%G" > /dev/$DEV_TTY$n
+ if [[ "$SETFONT_ARGS" ]]; then
+ /bin/setfont $SETFONT_ARGS -C /dev/$DEV_TTY$n
+ fi
+ done
+
+ [[ -f $dropfile ]] && rm $dropfile
+ STATUS_VARS="KEYMAP INCLUDEMAPS SETFONT_ARGS TTY_NUMS UNICODE_START
DEV_TTY"
+ for a in $STATUS_VARS; do
+ /bin/echo "$a=\"${!a}\"" >> $dropfile
+ done
diff --git a/smgl/epoch/scripts/keymapstop.sh
b/smgl/epoch/scripts/keymapstop.sh
new file mode 100755
index 0000000..e9b0575
--- /dev/null
+++ b/smgl/epoch/scripts/keymapstop.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+. /etc/sysconfig/keymap
+. /etc/sysconfig/devices
+
+dropfile=/var/tmp/keymap.drop
+
+ [[ "$TTY_NUMS" ]] && [[ "$SETFONT_ARGS" ]]
+
+ [[ -f $dropfile ]] && . $dropfile && rm $dropfile
+
+ [[ "$KEYMAP$INCLUDEMAPS" ]] &&
+ /bin/loadkeys defkeymap 2>&1
+
+ [[ "$UNICODE_START" ]] &&
+ /bin/kbd_mode -a
+
+ for n in $TTY_NUMS; do
+ [[ "$UNICODE_START" ]] && /bin/echo -ne '\033%@' > /dev/$DEV_TTY$n
+ if [[ "$SETFONT_ARGS" ]]; then
+ /bin/setfont default8x16 -C /dev/$DEV_TTY$n
+ fi
+ done
+
diff --git a/smgl/epoch/scripts/mountruntmp.sh
b/smgl/epoch/scripts/mountruntmp.sh
new file mode 100755
index 0000000..2c38a49
--- /dev/null
+++ b/smgl/epoch/scripts/mountruntmp.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+mount -n tmpfs /sys/fs/cgroup -t tmpfs -o defaults,size=4k,mode=755
+cd /sys/fs/cgroup
+for cgroup in cpuset cpu,cpuacct memory devices freezer net_cls blkio ; do
+ mkdir -p "${cgroup}"
+ mount -n cgroup "$cgroup" -t cgroup -o
defaults,rw,nosuid,nodev,noexec,relatime,${cgroup}
+done
+cd /
+# mount run
+mount -o defaults,size=512m -n -t tmpfs tmpfs /run
+mkdir -p /run/lock
+mkdir -p /run/shm
+# mount tmp
+mount -o defaults,size=1024m -n -t tmpfs tmpfs /tmp
diff --git a/smgl/epoch/scripts/udev.sh b/smgl/epoch/scripts/udev.sh
new file mode 100755
index 0000000..d289ae1
--- /dev/null
+++ b/smgl/epoch/scripts/udev.sh
@@ -0,0 +1,68 @@
+#!/bin/sh
+
+. /etc/sysconfig/devices
+
+udev_mknodes()
+{
+ if [ ! -d $udev_root/fd ]; then
+ ln -fs /proc/self/fd $udev_root/fd
+ fi
+ ln -s /dev/fd/0 $udev_root/stdin
+ ln -s /dev/fd/1 $udev_root/stdout
+ ln -s /dev/fd/2 $udev_root/stderr
+ mkdir $udev_root/shm
+ mkdir $udev_root/pts
+}
+
+start_udev()
+{ (
+ . /etc/udev/udev.conf
+ if findmnt devtmpfs > /dev/null 2>&1; then
+ true
+ else
+ mount -n -t ramfs none $udev_root
+ fi
+ # create some needed stuff
+ udev_mknodes
+
+# strip out kernel sublevel and patchlevel so we can check against them
+# since we don't support 1.x linux kernels then we don't have to check that
+ PATCHLEVEL=`uname -r | cut -d. -f2`
+ SUBLEVEL=`uname -r | cut -d. -f3`
+ tmp=`uname -r | cut -d. -f3 | sed 's/^[0-9]*//g'`
+ SUBLEVEL=${SUBLEVEL/$tmp/}
+
+ # kernel 2.6.15-rc1 and higher don't use hotplug
+ if [[ $(uname -r) = 3.* ]] || [ $SUBLEVEL -ge 15 -a $PATCHLEVEL -ge 6
]; then
+ echo > /proc/sys/kernel/hotplug
+ else
+ # Now uses udevsend as the hotplug multiplexer
+ sysctl -w kernel.hotplug="/sbin/udevsend" > /dev/null 2>&1
+ /sbin/udevstart
+ fi
+
+ if [ -f /etc/udev/udev.missing ]; then
+ cd /dev
+ while read line; do
+ if [ "${line:0:1}" == "#" ]; then continue; fi
+ for ((i=0; i<7; i++)); do
+ val[$i]=${line%%:*}
+ line=${line#*:}
+ done
+ if [ "${val[1]}" == "d" ]; then
+ mkdir ${val[0]}
+ else
+ mknod ${val[0]} ${val[1]} ${val[2]} ${val[3]}
+ fi
+ chmod ${val[4]} ${val[0]}
+ chown ${val[5]}:${val[6]} ${val[0]}
+ done < /etc/udev/udev.missing
+ cd /
+ fi
+ kill -USR1 1
+) }
+
+eval "start_$DEVICES"
+/sbin/udevd --daemon
+/sbin/udevadm trigger
+/sbin/udevadm settle --timeout=60
- [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (a53a84ef20177cc8a4c39c99f52b73c1b3ff5155), Pavel Vinogradov, 02/17/2015
Archive powered by MHonArc 2.6.24.