Use lua script in postun
Signed-off-by: Roman Rakus <rrakus@redhat.com>
This commit is contained in:
parent
32059bdce2
commit
a19016294b
26
bash.spec
26
bash.spec
@ -6,7 +6,7 @@
|
|||||||
Version: %{baseversion}%{patchleveltag}
|
Version: %{baseversion}%{patchleveltag}
|
||||||
Name: bash
|
Name: bash
|
||||||
Summary: The GNU Bourne Again shell
|
Summary: The GNU Bourne Again shell
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Group: System Environment/Shells
|
Group: System Environment/Shells
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Url: http://www.gnu.org/software/bash
|
Url: http://www.gnu.org/software/bash
|
||||||
@ -271,12 +271,21 @@ then
|
|||||||
end
|
end
|
||||||
f:close()
|
f:close()
|
||||||
|
|
||||||
%postun
|
%postun -p <lua>
|
||||||
if [ "$1" = 0 ]; then
|
t={}
|
||||||
/bin/grep -v '^/bin/bash$' < /etc/shells | \
|
for line in io.lines("/etc/shells")
|
||||||
/bin/grep -v '^/bin/sh$' > /etc/shells.new
|
do
|
||||||
/bin/mv /etc/shells.new /etc/shells
|
if line ~= "/bin/bash" and line ~= "/bin/sh"
|
||||||
fi
|
then
|
||||||
|
table.insert(t,line)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
f = io.open("/etc/shells", "w+")
|
||||||
|
for n,line in pairs(t)
|
||||||
|
do
|
||||||
|
f:write(line.."\n")
|
||||||
|
end
|
||||||
|
|
||||||
%files -f %{name}.lang
|
%files -f %{name}.lang
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -297,6 +306,9 @@ fi
|
|||||||
#%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt
|
#%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 14 2011 Roman Rakus <rrakus@redhat.com> - 4.2.7-2
|
||||||
|
- Use lua script in postun
|
||||||
|
|
||||||
* Mon Mar 07 2011 Roman Rakus <rrakus@redhat.com> - 4.2.7-1
|
* Mon Mar 07 2011 Roman Rakus <rrakus@redhat.com> - 4.2.7-1
|
||||||
- Patchlevel 7
|
- Patchlevel 7
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user