You are not logged in.
The tarball: http://files.iowolf.de/public/kernel26-lqx-test.tgz
I modified kernel26-lqx PKGBUILD, but I cannot get it to NOT execute the statement in line 98 of the PKGBUILD.
This is the block:
if [ $_localmodcfg = "y" ]; then
msg "If you have modprobe_db installed, running reload_database now"
if [[ -e /usr/bin/reload_database ]]; then
if [[ -e /usr/bin/kajsakskakskkakskaskak ]]; then
sudo /usr/bin/reload_database
else
if [ $(whoami) != "root" ]; then
msg2 "WARNING: You should either install sudo or run makepkg as root (not recommended) to successfully execute \"reload_database\"!"
msg2 "Continue? [y/N] "
read _yesno
if [ "$_yesno" != "y" -a "$_yesno" != "Y" ]; then
exit 1
fi
fi
/usr/bin/reload_database
fi
fi
msg "Running Steven Rostedt's make localmodconfig now"
make localmodconfig
else
if [ $_oldcfg = "y" ]; then
if [ ! -f /proc/config.gz ]; then
echo "WARNING: There's no \"/proc/config.gz\". Please unselect _oldcfg. Aborting..." 1>&2
exit 1
fi
yes "" | make oldconfig
else
yes "" | make config
fi
fi
It ALWAYS executes the "sudo /usr/bin/reload_database" and I don't know why?
Does anyone have a suggestion, please?
EDIT:
Strange, it is working outside of the PKGBUILD in a seperate file...
test.sh
#!/bin/bash
_localmodcfg="y"
_oldcfg="n"
if [ $_localmodcfg = "y" ]; then
echo "If you have modprobe_db installed, running reload_database now"
if [[ -e /usr/bin/reload_database ]]; then
if [[ -e /usr/bin/kajsakskakskkakskaskak ]]; then
sudo /usr/bin/reload_database
else
if [ $(whoami) != "root" ]; then
echo "WARNING: You should either install sudo or run makepkg as root (not recommended) to successfully execute \"reload_database\"!"
echo "Continue? [y/N] "
read _yesno
if [ "$_yesno" != "y" -a "$_yesno" != "Y" ]; then
exit 1
fi
fi
/usr/bin/reload_database
fi
fi
echo "Running Steven Rostedt's make localmodconfig now"
else
if [ $_oldcfg = "y" ]; then
if [ ! -f /proc/config.gz ]; then
echo "WARNING: There's no \"/proc/config.gz\". Please unselect _oldcfg. Aborting..." 1>&2
exit 1
fi
echo "make oldconfig"
else
echo "make config"
fi
fi
Output
akurei@joel: /tmp $ LANG=C bash lol.sh
If you have modprobe_db installed, running reload_database now
WARNING: You should either install sudo or run makepkg as root (not recommended) to successfully execute "reload_database"!
Continue? [y/N]
n
akurei@joel: /tmp $ LANG=C bash lol.sh
If you have modprobe_db installed, running reload_database now
WARNING: You should either install sudo or run makepkg as root (not recommended) to successfully execute "reload_database"!
Continue? [y/N]
y
WARNING: Error inserting hdaps (/lib/modules/2.6.39-ARCH/kernel/drivers/platform/x86/hdaps.ko): No such device or address
Running Steven Rostedt's make localmodconfig now
Last edited by akurei (2011-06-19 19:41:14)
Offline
That's interesting. I found this faq explaining the difference between [ and [[ but, while instructive for me, I don't think it helps .
Are you sure it's executing line 98 and not the second "/usr/bin/reload_database", the whole script being run as root?
Offline
That's interesting. I found this faq explaining the difference between [ and [[ but, while instructive for me, I don't think it helps .
I did try with single brackets, too. But it did not work either.
Are you sure it's executing line 98 and not the second "/usr/bin/reload_database", the whole script being run as root?
Pretty much, because it is asking for my password for sudo and I run this by executing "makepkg -fc".
Offline
Ah! Cool, I will try to fix it with that in mind! Thank you!
Offline
Are you sure it's executing line 98 and not the second "/usr/bin/reload_database", the whole script being run as root?
It turned out that it WAS executing the second "/usr/bin/reload_database". Seems like "reload_database" calls "sudo" by itself, that's what fooled me.
Offline