Commit 96e89d00 authored by Michael Shigorin's avatar Michael Shigorin

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.
parent 643d4a75
#!/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
......@@ -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
......
......@@ -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
......
......@@ -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
......@@ -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
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment