forcing monkeysphere shell to bash for FreeBSD.
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sun, 14 Sep 2008 23:50:18 +0000 (19:50 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sun, 14 Sep 2008 23:50:18 +0000 (19:50 -0400)
packaging/freebsd/distinfo
packaging/freebsd/pkg-install

index 26aa939e24e51ad4a404096627b9f8dd4f2d6308..b8ad49b095f80214a49536fd2b398ecfba594c5f 100644 (file)
@@ -1,3 +1,3 @@
-MD5 (monkeysphere_0.16~pre.orig.tar.gz) = e94bc8371adf8ce30c58ec040e436417
-SHA256 (monkeysphere_0.16~pre.orig.tar.gz) = f8543778c6ae5a7a87dcb03e34980436f6d967edeb87ccfac2cc19c750f4e588
+MD5 (monkeysphere_0.16~pre.orig.tar.gz) = c5c5211440e31d04df1f7904ec859fb9
+SHA256 (monkeysphere_0.16~pre.orig.tar.gz) = 77faf81cc51dff754ecb7122de26818b908e06ab4e0bdbd0320346dde53612cd
 SIZE (monkeysphere_0.16~pre.orig.tar.gz) = 59253
index 6783ee84b05effb443e73d169ab331bda4f2cb21..940b7963eee074937e91fc6734e09bc35f457ddc 100755 (executable)
@@ -22,6 +22,7 @@ POST-INSTALL)
         GROUP=${USER}
         UID=641
         GID=${UID}
+        SHELL=/usr/local/bin/bash
 
         if pw group show "${GROUP}" 2>/dev/null; then
                 echo "You already have a group \"${GROUP}\", so I will use it."
@@ -34,8 +35,15 @@ POST-INSTALL)
                 fi
         fi
 
-        if pw user show "${USER}" 2>/dev/null; then
-                echo "You already have a user \"${USER}\", so I will use it."
+        if oldshell=`pw user show "${USER}" 2>/dev/null`; then
+           if [ x"$oldshell" != x"$SHELL" ]; then
+               echo "You already have a \"${USER}\" user, but its shell is '$oldshell'."
+               echo "This package requires that \"${USER}\"'s shell be '$SHELL'."
+               echo "You should fix this by hand and then re-install the package."
+               echo "   hint: pw usermod '$USER' -s '$SHELL'"
+               exit 1
+           fi
+            echo "You already have a user \"${USER}\" with the proper shell, so I will use it."
         else
                 if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
                         -d "$VARLIB" -s /usr/local/bin/bash -c "monkeysphere authentication user,,,"