From: Marc Fiuczynski Date: Mon, 11 Oct 2004 19:38:48 +0000 (+0000) Subject: Fix so that vsh works from /bin/vsh again. X-Git-Tag: after-util-vserver-0_30_208-revert~236 X-Git-Url: http://git.onelab.eu/?p=util-vserver.git;a=commitdiff_plain;h=7261edfc44d5e8d3e14ce43c328d2149a0750a24 Fix so that vsh works from /bin/vsh again. --- diff --git a/scripts/vuseradd b/scripts/vuseradd index 3633535..6449cb6 100755 --- a/scripts/vuseradd +++ b/scripts/vuseradd @@ -4,7 +4,7 @@ # # Copyright (c) 2004 The Trustees of Princeton University (Trustees). # -# $Id: vuseradd,v 1.8 2004/09/22 17:55:12 mlhuang Exp $ +# $Id: vuseradd,v 1.9 2004/10/11 19:03:52 mef Exp $ # : ${UTIL_VSERVER_VARS:=$(dirname $0)/util-vserver-vars} @@ -27,7 +27,7 @@ NAME=$1 groupadd slices 2>/dev/null || : # add user -useradd -g slices -s /usr/sbin/vsh $NAME +useradd -g slices -s /bin/vsh $NAME # automount keys (eval expands ~) eval rm -rf ~$NAME/.ssh diff --git a/util-vserver.spec b/util-vserver.spec index 42c9684..1bc0e6f 100644 --- a/util-vserver.spec +++ b/util-vserver.spec @@ -97,9 +97,10 @@ fi for i in %{services} ; do [ "`/sbin/runlevel`" = "unknown" ] || service $i start done -if [ ! -f /etc/shells ] || ! grep -q '^/usr/sbin/vsh$' /etc/shells ; then - echo /usr/sbin/vsh >> /etc/shells +if [ ! -f /etc/shells ] || ! grep -q '^/bin/vsh$' /etc/shells ; then + echo /bin/vsh >> /etc/shells fi +ln -f /usr/sbin/vsh /bin/vsh %__chattr +t /vservers || : @@ -107,8 +108,9 @@ fi %postun # 0 = erase, 1 = upgrade if [ "$1" = 0 ] ; then - perl -i -n -e 'next if /^\/usr\/sbin\/vsh$/; print' /etc/shells + perl -i -n -e 'next if /^\/bin\/vsh$/; print' /etc/shells fi +rm -f /usr/sbin/vsh /bin/vsh %preun # 0 = erase, 1 = upgrade @@ -134,6 +136,7 @@ fi %dir /etc/vservers %attr(0,root,root) %dir /vservers %attr(4755,root,root) /usr/sbin/vsh +%attr(4755,root,root) /bin/vsh %exclude %_sbindir/newvserver %exclude %_mandir/man8/newvserver* diff --git a/util-vserver.spec.in b/util-vserver.spec.in index 563103a..6ba68e8 100644 --- a/util-vserver.spec.in +++ b/util-vserver.spec.in @@ -97,9 +97,10 @@ fi for i in %{services} ; do [ "`/sbin/runlevel`" = "unknown" ] || service $i start done -if [ ! -f /etc/shells ] || ! grep -q '^/usr/sbin/vsh$' /etc/shells ; then - echo /usr/sbin/vsh >> /etc/shells +if [ ! -f /etc/shells ] || ! grep -q '^/bin/vsh$' /etc/shells ; then + echo /bin/vsh >> /etc/shells fi +ln -f /usr/sbin/vsh /bin/vsh %__chattr +t /vservers || : @@ -107,8 +108,9 @@ fi %postun # 0 = erase, 1 = upgrade if [ "$1" = 0 ] ; then - perl -i -n -e 'next if /^\/usr\/sbin\/vsh$/; print' /etc/shells + perl -i -n -e 'next if /^\/bin\/vsh$/; print' /etc/shells fi +rm -f /usr/sbin/vsh /bin/vsh %preun # 0 = erase, 1 = upgrade @@ -134,6 +136,7 @@ fi %dir /etc/vservers %attr(0,root,root) %dir /vservers %attr(4755,root,root) /usr/sbin/vsh +%attr(4755,root,root) /bin/vsh %exclude %_sbindir/newvserver %exclude %_mandir/man8/newvserver*