Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create /dev/console and /dev/null #5

Merged
merged 2 commits into from
Jul 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# baselayout Makefile
# Copyright 2006-2011 Gentoo Foundation
# Copyright 2006-2023 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
#
# We've moved the installation logic from Gentoo ebuild into a generic
Expand All @@ -12,10 +12,11 @@ PKG = baselayout-$(PV)
DISTFILE = $(PKG).tar.bz2

CHANGELOG_LIMIT = --after="1 year ago"
INSTALL_DIR = install -m 0755 -d
INSTALL_EXE = install -m 0755
INSTALL_FILE = install -m 0644
INSTALL_SECURE = install -m 0600
INSTALL ?= install
INSTALL_DIR = $(INSTALL) -m 0755 -d
INSTALL_EXE = $(INSTALL) -m 0755
INSTALL_FILE = $(INSTALL) -m 0644
INSTALL_SECURE = $(INSTALL) -m 0600

KEEP_DIRS = \
/bin \
Expand All @@ -27,7 +28,6 @@ KEEP_DIRS = \
/mnt \
/opt \
/proc \
/root \
/run \
/sbin \
/sys \
Expand Down Expand Up @@ -70,9 +70,13 @@ layout:
ln -snf ../run $(DESTDIR)/var/run
ln -snf ../run/lock $(DESTDIR)/var/lock
# Special dirs
chmod 0700 $(DESTDIR)/root
chmod 1777 $(DESTDIR)/var/tmp
chmod 1777 $(DESTDIR)/tmp
$(INSTALL) -d -m 0700 $(DESTDIR)/root
$(INSTALL) -d -m 1777 $(DESTDIR)/tmp
$(INSTALL) -d -m 1777 $(DESTDIR)/var/tmp
# Essential device nodes for init/openrc in early boot
# Nonfatal in case we are running as non-root
-mknod -m 0600 $(DESTDIR)/dev/console c 5 1
-mknod -m 0666 $(DESTDIR)/dev/null c 1 3

layout-usrmerge: layout
rm -fr ${DESTDIR}/bin
Expand Down