Mercurial > hg > anonet-resdb
view configure @ 822:656b9133db24 draft
See commit b422ead31b077041cb030064008c6cd26ba058d0 for more info.
/NNNC/somerandomnick> Why did you change configure to require bash?
/relayhell/d3v11> you didn't see the commit message?
/NNNC/somerandomnick> /relayhell/d3v11: not yet
/NNNC/somerandomnick> /relayhell/d3v11: I was just looking at the diff.
/NNNC/somerandomnick> /relayhell/d3v11: slackware doesn't even have a dash package available, so I'm not sure how pika managed to get himself that error.
/relayhell/d3v11> if you want to change it back, go for it.
/NNNC/somerandomnick> /relayhell/d3v11: I'd rather not start an edit war with you.
/relayhell/d3v11> LOL if you change it back i won't rechange it
/relayhell/d3v11> i made an executive decision because it gives a bunch of people shit.
/NNNC/somerandomnick> The problem is caused by distributions that give people a bunch of shit.
/NNNC/somerandomnick> "a bunch of shit" == sh pointing to a deliberately stripped down dash
/relayhell/d3v11> right
/NNNC/somerandomnick> sh should point to a useful default shell for users.
/relayhell/d3v11> should but it doesn't always
/NNNC/somerandomnick> really only in systems with upstart
/NNNC/somerandomnick> and bash can do everything dash can do, so it's always safe to fix the distribution
/NNNC/somerandomnick> "fix the distribution" == ln -s bash /bin/sh
/relayhell/d3v11> if you think the change is problematic, then i welcome you rechanging it.
/NNNC/somerandomnick> The change is problematic because it breaks any system that doesn't have bash.
author | Nick <nick@somerandomnick.ano> |
---|---|
date | Tue, 13 Dec 2011 04:12:07 +0000 |
parents | f1f0ab9d41b7 |
children | 5016f753b47a |
line wrap: on
line source
#!/bin/sh vars="gitd_ip gitd_basepath git_name git_email tinydns_config tinydns__rootsrvrname tinydns__rootsrvrip tinydns__tldsrvrname tinydns__tldsrvrip tinydns__srvrip tinydns__srvrname" echo "Welcome to the resdb configurator!" >&2 echo >&2 if ! echo "$var=${!var}" >/dev/null 2>&1; then echo "Your shell sucks. If you're using a stupid OS like Ubuntu that doesn't" >&2 echo "give a damn about backwards compatibility, I'd suggest fixing your" >&2 echo "default shell, which you can do by typing \"ln -s bash /bin/sh\" at a" >&2 echo "root shell prompt." >&2 echo "If you have some ancient Unix system, I'd suggest installing bash." >&2 echo "If you have questions, you can always bother SRN :-)" >&2 exit 1 fi for var in $vars ; do export "$var"="$(cat conf/$var 2>/dev/null)" done if [ x"$gitd_basepath" = x ]; then gitd_basepath="$(pwd)/" fi if [ x"$git_name" = x ]; then git_name="Anonymous Coward" fi if [ x"$git_email" = x ]; then git_email="nobody@nowhere" fi if [ x"$tinydns_config" = x ]; then tinydns_config=n fi if [ x"$tinydns__rootsrvrname" = x ]; then tinydns__rootsrvrname="uz5hn5hz5x5bp09p5z2806x4gngcw1k5j2wk88fuvkth5pp2hw4t2d.rootns.somerandomnick.ano" fi if [ x"$tinydns__rootsrvrip" = x ]; then tinydns__rootsrvrip="1.0.27.39" fi if [ x"$tinydns__tldsrvrname" = x ]; then tinydns__tldsrvrname="uz5fvb7zdqyuz4q8ysjdfuf04kzd2lrt0l6fp4uyguxdg5tfut06ck.anons.somerandomnick.ano" fi if [ x"$tinydns__tldsrvrip" = x ]; then tinydns__tldsrvrip="1.0.27.37" fi if [ x"$tinydns__srvrname" = x ]; then tinydns__srvrname="uz5z6spsd4jsd2k984wuzknr13gwjc630gmvtcv4bmpsrb04c179h1.ns.somerandomnick.ano" fi if [ x"$tinydns__srvrip" = x ]; then tinydns__srvrip="1.0.27.86" fi echo "Please enter the IP address you'd like gitd to listen on." >&2 echo "(Default: $gitd_ip)" >&2 echo -n "IP? " >&2 read new_gitd_ip if [ x"$new_gitd_ip" != x ]; then gitd_ip="$new_gitd_ip" fi echo "Please enter the full path to resdb." >&2 echo "(Default: $gitd_basepath)" >&2 echo -n "BasePath? " >&2 read new_gitd_basepath if [ x"$new_gitd_basepath" != x ]; then gitd_basepath="$new_gitd_basepath" fi echo "Please enter your name." >&2 echo "(Default: $git_name)" >&2 echo -n "Name? " >&2 read new_git_name if [ x"$new_git_name" != x ]; then git_name="$new_git_name" fi echo "Please enter your email." >&2 echo "(Default: $git_email)" >&2 echo -n "Email? " >&2 read new_git_email if [ x"$new_git_email" != x ]; then git_email="$new_git_email" fi echo -n "Would you like to configure the tinydns datafile generator? " >&2 read new_tinydns_config if [ x"$new_tinydns_config" != x ]; then tinydns_config="$new_tinydns_config" fi if [ x"$tinydns_config" = xy ]; then echo "Please enter the hostname of your root nameserver." >&2 echo "(Default: $tinydns__rootsrvrname)" >&2 echo -n "RootSrvName? " >&2 read new_tinydns__rootsrvrname if [ x"$new_tinydns__rootsrvrname" != x ]; then tinydns__rootsrvrname="$new_tinydns__rootsrvrname" fi echo "Please enter the IP address of your root nameserver." >&2 echo "(Default: $tinydns__rootsrvrip)" >&2 echo -n "RootSrvIP? " >&2 read new_tinydns__rootsrvrip if [ x"$new_tinydns__rootsrvrip" != x ]; then tinydns__rootsrvrip="$new_tinydns__rootsrvrip" fi echo "Please enter the hostname of your .ano TLD server." >&2 echo "(Default: $tinydns__tldsrvrname)" >&2 echo -n "TLDSrvName? " >&2 read new_tinydns__tldsrvrname if [ x"$new_tinydns__tldsrvrname" != x ]; then tinydns__tldsrvrname="$new_tinydns__tldsrvrname" fi echo "Please enter the IP address of your .ano TLD server." >&2 echo "(Default: $tinydns__tldsrvrip)" >&2 echo -n "TLDSrvIP? " >&2 read new_tinydns__tldsrvrip if [ x"$new_tinydns__tldsrvrip" != x ]; then tinydns__tldsrvrip="$new_tinydns__tldsrvrip" fi echo "Please enter the hostname of your nameserver." >&2 echo "(Default: $tinydns__srvrname)" >&2 echo -n "SrvName? " >&2 read new_tinydns__srvrname if [ x"$new_tinydns__srvrname" != x ]; then tinydns__srvrname="$new_tinydns__srvrname" fi echo "Please enter the IP address of your nameserver." >&2 echo "(Default: $tinydns__srvrip)" >&2 echo -n "SrvIP? " >&2 read new_tinydns__srvrip if [ x"$new_tinydns__srvrip" != x ]; then tinydns__srvrip="$new_tinydns__srvrip" fi fi echo "Proposed configuration:" >&2 for var in $vars ; do echo "$var=${!var}" >&2 done echo -n "To write the configuration, hit RETURN. To abort, hit ^C: " >&2 read write_config echo -n "Writing configuration... " >&2 mkdir -p conf || exit 1 for var in $vars ; do echo "${!var}" > conf/"$var" || exit 1 done echo "Done" >&2 echo -n "Updating git configuration... " >&2 cd "$(cat ./conf/gitd_basepath)" || exit 1 git config user.name "$(cat ./conf/git_name)" || exit 1 git config user.email "$(cat ./conf/git_email)" || exit 1 echo "Done" >&2