6 Commits
1.5.4 ... 1.6.1

Author SHA1 Message Date
fbt
e4b9660bce Merge branch 'master' of builder:git/spark-rc 2015-03-02 17:40:16 +03:00
fbt
550fabfc8e tmpfiles 2015-03-02 17:40:09 +03:00
fbt
a607a63107 Code cleanup, thx to http://www.shellcheck.net 2015-01-17 16:37:15 +03:00
fbt
782b0a3fe8 Newline, bitch 2015-01-08 15:35:06 +03:00
fbt
440eada379 simplify the default rc.conf 2015-01-08 12:42:44 +03:00
fbt
1c91d74984 support for reading hostname from /etc/hostname 2015-01-08 11:13:47 +03:00
2 changed files with 9 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ cfg_hostname='changeme'
# Services # Services
cfg_services+=( 'fsck' 'mount' 'systemd-udevd' 'sysctl' ) # Services that need tp be started in an order cfg_services+=( 'fsck' 'mount' 'systemd-udevd' 'sysctl' ) # Services that need tp be started in an order
cfg_services+=( '@lo.iface' '@crond' '@dbus' '@alsa' ) # These start in parallel. cfg_services+=( '@lo.iface' ) # These start in parallel.
cfg_services+=( @agetty-tty{2..6} ) # Comment this if your init starts something on the ttys itself. cfg_services+=( @agetty-tty{2..6} ) # Comment this if your init starts something on the ttys itself.
cfg_services+=( 'rc.local' ) # Traditionally, rc.local starts last. Technically here it doesn't. Not quite :) cfg_services+=( 'rc.local' ) # Traditionally, rc.local starts last. Technically here it doesn't. Not quite :)

10
rc.in
View File

@@ -20,7 +20,7 @@ rc.rescue() { exec "${cfg_rc_rescue_shell:-"$SHELL"}"; }
rc.motd() { rc.motd() {
[[ -f "/etc/rc.motd" ]] && { [[ -f "/etc/rc.motd" ]] && {
while read; do while read; do
printf "$REPLY" printf "%s\n" "$REPLY"
done < "/etc/rc.motd" done < "/etc/rc.motd"
} }
@@ -115,6 +115,7 @@ rc.remount_root() {
rc.boot() { rc.boot() {
rc.mount_misc rc.mount_misc
rc.tmpdirs rc.tmpdirs
rc.tmpfiles
rc.hostname rc.hostname
rc.timezone rc.timezone
rc.modules rc.modules
@@ -143,6 +144,7 @@ rc.shutdown() {
} }
rc.hostname() { rc.hostname() {
[[ -f '/etc/hostname' ]] && { hostname "$(</etc/hostname)"; }
[[ "$cfg_hostname" ]] && { hostname "$cfg_hostname"; } [[ "$cfg_hostname" ]] && { hostname "$cfg_hostname"; }
} }
@@ -158,6 +160,10 @@ rc.timezone() {
} }
} }
rc.tmpfiles() {
>/run/utmp
}
rc.main() { rc.main() {
source "@ETC@/rc.conf" source "@ETC@/rc.conf"
@@ -165,7 +171,7 @@ rc.main() {
case "$action" in case "$action" in
boot) boot)
echo "Welcome to `uname -rs`" echo "Welcome to $(uname -rs)"
rc.boot rc.boot
;; ;;