Browse Source

add POPULATE_{RUN,TMP} option

2.3.1
obarun 2 years ago
parent
commit
b8cce7746e
  1. 4
      Makefile
  2. 10
      configure
  3. 16
      module/boot@/.configure/configure
  4. 8
      service/boot@

4
Makefile

@ -76,7 +76,9 @@ $(DESTDIR)$(service_directory)/%: service/%
-e 's,@MNT_TMP@,$(MNT_TMP),' \
-e 's,@MNT_PTS@,$(MNT_PTS),' \
-e 's,@MNT_SHM@,$(MNT_SHM),' \
-e 's,@MNT_NETFS@,$(MNT_NETFS),' $@
-e 's,@MNT_NETFS@,$(MNT_NETFS),' \
-e 's,@POPULATE_RUN@,$(POPULATE_RUN),' \
-e 's,@POPULATE_TMP@,$(POPULATE_TMP),' $@
version:
@echo $(version)

10
configure vendored

@ -60,6 +60,8 @@ Fine tunning of boot configuration:
--MNT_PTS=BOOLEAN mount /dev/pts [!yes]
--MNT_SHM=BOOLEAN mount /dev/shm [!yes]
--MNT_NETFS=BOOLEAN mount no-network filesystems [!yes]
--POPULATE_RUN=BOOLEAN populate run directory [!yes]
--POPULATE_TMP=BOOLEAN populate tmp directory [!yes]
Use yes or no with lowercase character to set BOOLEAN values.
@ -169,6 +171,8 @@ MNT_TMP='!yes'
MNT_PTS='!yes'
MNT_SHM='!yes'
MNT_NETFS='!yes'
POPULATE_RUN='!yes'
POPULATE_TMP='!yes'
for arg ; do
@ -220,6 +224,8 @@ for arg ; do
--MNT_PTS=*) MNT_PTS=${arg#*=} ;;
--MNT_SHM=*) MNT_SHM=${arg#*=} ;;
--MNT_NETFS=*) MNT_NETFS=${arg#*=} ;;
--POPULATE_RUN=*) POPULATE_RUN=${arg#*=} ;;
--POPULATE_TMP=*) POPULATE_TMP=${arg#*=} ;;
-* ) echo "$0: unknown option $arg" ;;
*=*) ;;
*) target=$arg ;;
@ -277,7 +283,7 @@ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE \
FSTAB SWAP LVM DMRAID BTRFS ZFS \
CRYPTTAB IPTABLES IP6TABLES \
CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
MNT_PTS MNT_SHM MNT_NETFS ; do
MNT_PTS MNT_SHM MNT_NETFS POPULATE_RUN POPULATE_TMP ; do
eval tmp=\${$i}
if testval $tmp; then
eval $i='#${i}='
@ -358,6 +364,8 @@ $MNT_TMP
$MNT_PTS
$MNT_SHM
$MNT_NETFS
$POPULATE_RUN
$POPULATE_TMP
EOF
exec 1>&3 3>&-

16
module/boot@/.configure/configure vendored

@ -31,7 +31,9 @@ sv_boolean_list=(
CGROUPS
MNT_PTS
MNT_SHM
MNT_NETFS')
MNT_NETFS
POPULATE_RUN
POPULATE_TMP')
sv_container_list=(
'HARDWARECLOCK
@ -89,12 +91,12 @@ retrieve_sv_name(){
MNT_PTS) SV_REAL="mount-pts" ;;
MNT_SHM) SV_REAL="mount-shm" ;;
MNT_NETFS) SV_REAL="mount-netfs" ;;
POPULATE_RUN) SV_REAL="populate-run" ;;
POPULATE_TMP) SV_REAL="populate-tmp" ;;
## extra service not set by the environment section
UDEV_ADM) SV_REAL="udevadm" ;;
POPULATE_SYS) SV_REAL="populate-sys" ;;
POPULATE_DEV) SV_REAL="populate-dev" ;;
POPULATE_RUN) SV_REAL="populate-run" ;;
POPULATE_TMP) SV_REAL="populate-tmp" ;;
esac
unset sv
@ -181,14 +183,6 @@ if [ ${MNT_DEV} == "no" ]; then
sv_comment_real "populate-dev"
fi
if [ ${MNT_RUN} == "no" ]; then
sv_comment_real "populate-run"
fi
if [ ${MNT_TMP} == "no" ]; then
sv_comment_real "populate-tmp"
fi
if [ ${LVM} == "no" ] && [ ${DMRAID} == "no" ] && \
[ ${BTRFS} == "no" ] && [ ${ZFS} == "no" ] && [ ${CRYPTTAB} == "no" ]; then
sv_comment_real "system-Devices"

8
service/boot@

@ -198,3 +198,11 @@ MNT_SHM=@MNT_SHM@
## Fstype mounted is: nosysfs,nonfs,nonfs4,nosmbfs,nocifs
MNT_NETFS=@MNT_NETFS@
## Create /run/{lvm,user,lock,utmp} directories
POPULATE_RUN=!yes
## Create /tmp/{.X11-unix,.ICE-unix} files
POPULATE_TMP=!yes

Loading…
Cancel
Save