Skip to content

Commit

Permalink
Removed statefull files.
Browse files Browse the repository at this point in the history
  • Loading branch information
cavalier38 committed Oct 4, 2013
1 parent 5363144 commit 4b64bd6
Show file tree
Hide file tree
Showing 9 changed files with 93 additions and 4 deletions.
2 changes: 1 addition & 1 deletion conf/modules.iso
@@ -1 +1 @@
ISO_MODULES=acl attr bash btrfs-progs bzip2 coreutils cracklib dbus dhcpcd dialog diffutils dosfstools e2fsprogs e3 ed expat fhs file findutils gawk gc glib-2 glibc gmp grep gzip iproute2 irssi jfsutils joe kbd kmod less libcap libffi libidn libmpc libtool Linux-PAM lunar lvm2 mdadm memtest86+ mpfr nano ncurses netcat ntfsprogs openssh openssl parted pcre procps readline sed shadow systemd systemd-sysv tar timezone-date util-linux vim wget which xfsprogs xz zile zlib
ISO_MODULES=acl attr bash btrfs-progs bzip2 coreutils cracklib dbus dhcpcd dialog diffutils dosfstools e2fsprogs e3 ed expat fhs file findutils gawk gc glib-2 glibc gmp grep groff gzip iproute2 irssi jfsutils joe kbd kmod less libcap libffi libidn libmpc libtool Linux-PAM lunar lvm2 man mdadm memtest86+ mpfr nano ncurses netcat ntfsprogs openssh openssl parted pcre procps readline sed shadow systemd systemd-sysv tar timezone-date util-linux vim wget which xfsprogs xz zile zlib
1 change: 1 addition & 0 deletions livecd/template/etc/systemd/system/autovt@.service
1 change: 1 addition & 0 deletions livecd/template/etc/systemd/system/default.target
45 changes: 45 additions & 0 deletions livecd/template/etc/systemd/system/getty@.service
@@ -0,0 +1,45 @@
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.

[Unit]
Description=Getty on %I
Documentation=man:agetty(8) man:systemd-getty-generator(8)
Documentation=http://0pointer.de/blog/projects/serial-console.html
After=systemd-user-sessions.service plymouth-quit-wait.service

# If additional gettys are spawned during boot then we should make
# sure that this is synchronized before getty.target, even though
# getty.target didn't actually pull it in.
Before=getty.target
IgnoreOnIsolate=yes

# On systems without virtual consoles, don't start any getty. Note
# that serial gettys are covered by serial-getty@.service, not this
# unit.
ConditionPathExists=/dev/tty0

[Service]
# the VT is cleared by TTYVTDisallocate
ExecStart=-/sbin/agetty --noclear %I -a root
Type=idle
Restart=always
RestartSec=0
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
KillMode=process
IgnoreSIGPIPE=no
SendSIGHUP=yes

# Unset locale for the console getty since the console has problems
# displaying some internationalized messages.
Environment=LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION=

[Install]
WantedBy=getty.target
33 changes: 33 additions & 0 deletions livecd/template/etc/systemd/system/installer@.service
@@ -0,0 +1,33 @@
# This file is part of Lunar-Linux.

[Unit]
Description=Installer on %I
After=systemd-user-sessions.service plymouth-quit-wait.service

# If additional gettys are spawned during boot then we should make
# sure that this is synchronized before getty.target, even though
# getty.target didn't actually pull it in.
Before=getty.target
IgnoreOnIsolate=yes

# On systems without virtual consoles, don't start any getty. Note
# that serial gettys are covered by serial-getty@.service, not this
# unit.
ConditionPathExists=/dev/tty0

[Service]
# the VT is cleared by TTYVTDisallocate
ExecStart=-/sbin/agetty --noclear %I -n -l su -o "-l -c /sbin/lunar-install"
Type=idle
Restart=always
RestartSec=0
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
KillMode=process
IgnoreSIGPIPE=no

[Install]
WantedBy=getty.target
6 changes: 5 additions & 1 deletion mkfiles/iso.mk
Expand Up @@ -38,8 +38,12 @@ $(ISO_TARGET)/etc/%: $(ISO_SOURCE)/livecd/template/etc/% iso-modules
# Symlinks need special care
$(ISO_TARGET)/.iso-files: iso-target
@echo iso-files
@ln -sf /usr/lib/systemd/system/multi-user.target $(ISO_TARGET)/etc/systemd/system/default.target
@rm -f $(ISO_TARGET)/etc/systemd/system/getty.target.wants/getty\@tty1.service $(ISO_TARGET)/etc/dracut.conf.d/02-lunar-live.conf $(ISO_TARGET)/etc/ssh/ssh_host_*
@[ ! -d $(ISO_TARGET)/etc/dracut.conf.d ] || rmdir --ignore-fail-on-non-empty $(ISO_TARGET)/etc/dracut.conf.d
@cp -r $(ISO_SOURCE)/livecd/template/etc/systemd $(ISO_TARGET)/etc/systemd
@> $(ISO_TARGET)/etc/machine-id
@ln -sf ../../tmp/random-seed $(ISO_TARGET)/var/lib/random-seed
@mkdir $(ISO_TARGET)/var/cache/man
@touch $@

iso-files: $(ISO_TARGET)/.iso-files $(addprefix $(ISO_TARGET)/etc/, $(ISO_ETC_FILES))
Expand Down
6 changes: 5 additions & 1 deletion mkfiles/pack.mk
Expand Up @@ -7,7 +7,11 @@ pack: pack-base
.INTERMEDIATE: $(ISO_TARGET)/.aaa_base.found
$(ISO_TARGET)/.aaa_base.found: stage2
@echo pack-find
@find $(ISO_TARGET) ! -path '$(ISO_TARGET)/.*' -printf '/%P\n' \( \
@find $(ISO_TARGET) ! -path '$(ISO_TARGET)/.*' -a \
! -path '$(ISO_TARGET)/etc/machine-id' -a \
! -path '$(ISO_TARGET)/etc/ssh/ssh_host_*' -a \
! -path '$(ISO_TARGET)/etc/dracut.conf.d/02-lunar-live.conf' \
-printf '/%P\n' \( \
-path '$(ISO_TARGET)/dev' -o \
-path '$(ISO_TARGET)/etc/lunar/local' -o \
-path '$(ISO_TARGET)/mnt' -o \
Expand Down
2 changes: 1 addition & 1 deletion mkfiles/stage2.mk
Expand Up @@ -50,7 +50,7 @@ stage2-modules: $(ISO_TARGET)/.stage2-modules
$(ISO_TARGET)/.stage2-spool: stage2-target download
@echo stage2-spool
@mkdir -p $(ISO_TARGET)/var/spool/lunar
@cp $(ISO_SOURCE)/spool/* $(ISO_TARGET)/var/spool/lunar/
@ln $(ISO_SOURCE)/spool/* $(ISO_TARGET)/var/spool/lunar/
@touch $@

stage2-spool: $(ISO_TARGET)/.stage2-spool
Expand Down

0 comments on commit 4b64bd6

Please sign in to comment.