s/subst/sed -i/g

Initial openSUSE package base taming effort has shown that
relatively few things should be fixed; subst has been generalized
as -i option to sed(1) since its introduction, so let's just fix it.
This commit is contained in:
Michael Shigorin 2011-12-26 18:20:12 +02:00
parent 643d4a753d
commit 96e89d0062
6 changed files with 6 additions and 6 deletions

View File

@ -1,3 +1,3 @@
#!/bin/sh -e
# we don't need no gettys in OpenVZ VEs (might need one in LXC though)
subst 's,^[0-9]\+:[0-9]\+:respawn:/sbin/mingetty.*,#&,' /etc/inittab
sed -i 's,^[0-9]\+:[0-9]\+:respawn:/sbin/mingetty.*,#&,' /etc/inittab

View File

@ -29,7 +29,7 @@ fi
# $TMP
TMP="/tmp/.private/$USER"
control pam_mktemp enabled
subst '/^%_tmppath.*tmp$/d' "$HOME/.rpmmacros"
sed -i '/^%_tmppath.*tmp$/d' "$HOME/.rpmmacros"
echo "%_tmppath $TMP" >> "$HOME/.rpmmacros"
# ~/hasher

View File

@ -5,7 +5,7 @@ USER=altlinux
INITTAB=/etc/inittab
if [ -f "$INITTAB" ]; then
[ -z "$runlevel" ] && runlevel=5
subst "s,^\(id:\)\(.*\)\(:initdefault.*\),\\1$runlevel\\3," "$INITTAB"
sed -i "s,^\(id:\)\(.*\)\(:initdefault.*\),\\1$runlevel\\3," "$INITTAB"
fi
# autologin^2

View File

@ -2,5 +2,5 @@
# prepare base make-initrd configuration for stage1
# see also http://www.altlinux.org/Make-initrd-propagator
subst 's/AUTODETECT/#AUTODETECT/' /etc/initrd.mk
sed -i 's/AUTODETECT/#AUTODETECT/' /etc/initrd.mk
echo 'FEATURES += propagator' >> /etc/initrd.mk

View File

@ -5,7 +5,7 @@
# FIXME: move to plymouth feature
#if [ -f /etc/plymouth/plymouthd.conf ];then
# subst 's/#\([T\[]\)/\1/' /etc/plymouth/plymouthd.conf
# sed -i 's/#\([T\[]\)/\1/' /etc/plymouth/plymouthd.conf
# echo 'FEATURES += plymouth' >> /etc/initrd.mk
#fi

View File

@ -25,7 +25,7 @@ endef
set = $(and $(1),$(2),$(set_body))
define set_body
{ $(log_body); \
subst 's|^$(1)[ ]*[+?]*=.*$$|#& # overridden by $@|' "$(CONFIG)"; \
sed -i 's|^$(1)[ ]*[+?]*=.*$$|#& # overridden by $@|' "$(CONFIG)"; \
printf '%s = %s\n' '$(1)' '$(2)' >> "$(CONFIG)"; }
endef