Joe L. Posted January 17, 2009 Author Share Posted January 17, 2009 I've not yet found the NTFS drive, but I did find a tiny flaw in the logic. If you add the line below in BLUE, the mount options will be read from the unmenu_local.conf file in addition to the unmenu.conf file. For mount-options the local file was not being looked at at all. That is why changes you made there were ignored for those options, but not for others. At around line 1202 of unmenu.awk is a function: function SetUpDiskMgmtPage( theMenuVal ) { GetMountOptions(ScriptDirectory "/" ConfigFile); GetMountOptions(ScriptDirectory "/" LocalConfigFile); if ( GETARG["disk_device"] == "" && GETARG["hdparm"] == "HDParm+Info" ) { DiskCommandOutput = "You must first select a disk before running hdparm on it." delete GETARG; } You can either add the line as I have shown so both .conf files are scanned for MOUNT_OPTION lines, or modify the unmenu.conf file instead of the local file, at least until I have sufficient stuff done to warrant a version 1.2 release of unMENU. I still need to hook up an NTFS drive so I can write to it in case something else is blocking write access, but this was certainly a start. Joe L. Link to comment
Joe L. Posted January 17, 2009 Author Share Posted January 17, 2009 I confirmed that I could mount and write to an NTFS formatted drive from the Disk-Management page once I added that one line described in the above post and then modified my unmenu_local.conf file accordingly. (or, I could have edited unmenu.conf and not changed the unmenu.awk file.) I found I could either change the line for NTFS-3g to this (eliminating the "-r" option entirely) MOUNT_OPTIONS ntfs-3g = -o umask=111,dmask=000 -t ntfs-3g or this (changing the "-r" to "-w" ) MOUNT_OPTIONS ntfs-3g = -w -o umask=111,dmask=000 -t ntfs-3g Both would let me mount and share the NTFS drive on the LAN and write to it. Thanks for helping locate my omission of checking the unmenu_local.conf file for MOUNT_OPTIONS Joe L. Link to comment
Joe L. Posted January 17, 2009 Author Share Posted January 17, 2009 I just noticed the error message you posted. It says the reason the ntfs file system cannot be mounted was because it was "marked as in use" and not shut down properly when it was last on windows. It suggests the "force" option if all else fails. You would need to try MOUNT_OPTIONS ntfs-3g = -o force,umask=111,dmask=000 -t ntfs-3g I've never used the "force" option... Before using it, I'd try putting the USB drive on a windows PC and then "eject" the drive using the "Safely Remove Hardware" feature on your windows PC. Then you could see if it is still saying the drive is in use when you try to use it under Linux. Link to comment
JarDo Posted January 18, 2009 Share Posted January 18, 2009 Ohhh... So you're suggesting that something is recorded on the drive itself as a result of its last interaction with Windows? That is interesting and gives me some things to try. Link to comment
JarDo Posted January 18, 2009 Share Posted January 18, 2009 While we're on the subject of installation order (see the Go Script Manager thread), there is a another thought I've had about the Package Manager that I have had for a long time but haven't yet shared. My thought is this... The conf files for the Package Manager have a place to define dependencies. What if when a package dependency defined in a package conf file were another package that the Package Manager were somehow smart enough to know that the dependent package need also be enabled and installed prior to the package defining the dependency??? for example: In this case, if the user were to enable the smartmontools-unmenu-package.conf for installation, the cxxlibs-unmenu-package.conf would also be enabled for installation, and configured to install prior to the smartmontools-unmenu-package.conf package. Link to comment
JarDo Posted January 19, 2009 Share Posted January 19, 2009 Joe... Just an update. I made the needed changes to my unmenu.awk and now I am able to properly mount a USB NTFS drive via unMenu as R/W by making the needed changes to my unmenu_local.conf. It does appear that the issue was with my 'failure' to disconnect the drive from the windows machine 'correctly'. This time I used the 'Safely Remove Hardware' option and then I had no problems mounting the drive on my unRaid server. You 'da man! Link to comment
musicmann Posted January 19, 2009 Share Posted January 19, 2009 I'm in the process of upgrading from unRAID 4.3.3 to 4.4.2, and I want to move to unMENU, as well. I've spent most of today reading this entire thread...but I still have some questions with respect to how I use to do things with all via my Go script. Maybe some of these will be answered when I implement unMENU tomorrow (I'm testing some new memory right now), but maybe I can get some of them answered prior. 1. Is there a way to automatically invoke scripts? For example, the monthly parity check script I use is currently invoked via the Go script. I see a User Scripts section in unMENU, but it looks like it's for manually doing things? 2. I'm currently copying a couple of files into place each reboot (e.g., Joe's mail script into /usr/bin/mail; the email notification into /etc/cron.hourly). Is there a cleaner "unMENU" way of handling this? 3. Specifically wrt apcupsd, I'm thinking that powerdown as well as netcat and mail (mentioned) are needed. Am I wrong? Is there any reason they are not included in the standard zip file? Also, I never understood Joe's sed commands for apcupsd.conf, so I had simply modified my file directly. I also modified all the /etc/apcupsd files to have use my email address for alerts. Are you guys setting up apcupsd to email you on problems? Thanks in advance, mm Link to comment
musicmann Posted January 22, 2009 Share Posted January 22, 2009 I'm figuring out answers to most of my questions above, but I've run into a weird issue with cxxlibs-6.0.8-i486-4.tgz. Whenever I install it (even from the commandline), I can no longer access the Package Manager page in unMENU. I get a page with just "e 0" Here is the page source: e </BODY></HTML> 0 Any ideas? Link to comment
Joe L. Posted January 22, 2009 Author Share Posted January 22, 2009 I'm figuring out answers to most of my questions above, but I've run into a weird issue with cxxlibs-6.0.8-i486-4.tgz. Whenever I install it (even from the commandline), I can no longer access the Package Manager page in unMENU. I get a page with just "e 0" Here is the page source: e </BODY></HTML> 0 Any ideas? If you are using "uu" to start up unmenu, then look in the syslog. The actual error might be logged there. If not, then kill the existing unmenu.awk and start unmenu.awk by typing cd your_directory_with_awk_files awk -W re-interval -f unmenu.awk Then browse to the package manager page. From past experience, it is possible you do not have a nameserver defined, so connectivity to the outside world does not exist. Joe L. Link to comment
musicmann Posted January 22, 2009 Share Posted January 22, 2009 [if you are using "uu" to start up unmenu, then look in the syslog. The actual error might be logged there. If not, then kill the existing unmenu.awk and start unmenu.awk by typing cd your_directory_with_awk_files awk -W re-interval -f unmenu.awk Then browse to the package manager page. From past experience, it is possible you do not have a nameserver defined, so connectivity to the outside world does not exist. Joe L. I don't see anything in the syslog. I've restarted the server, logged in via a telnet session, then installed the libraries. When I cat the syslog, the last lines I see are the recent telnet login. Although I started unmenu using "uu," I tried the command you mentioned: root@Tower:~# cd /boot/unmenu root@Tower:/boot/unmenu# awk -W re-interval -f unmenu.awk awk: unmenu.awk:253: fatal: can't open two way socket `/inet/tcp/8080/0/0' for input/output (No such file or directory) root@Tower:/boot/unmenu# killall awk root@Tower:/boot/unmenu# awk -W re-interval -f unmenu.awk awk: unmenu.awk:569: fatal: print to "/inet/tcp/8080/0/0" failed (Connection reset by peer) root@Tower:/boot/unmenu# awk -W re-interval -f unmenu.awk gawk: ./990-unmenu-wget.awk:41: warning: escape sequence `\.' treated as plain `.' gawk: ./990-unmenu-wget.awk:395: fatal: expression for `|' redirection has null string value awk: unmenu.awk:569: fatal: print to "/inet/tcp/8080/0/0" failed (Connection reset by peer) root@Tower:/boot/unmenu# ls 07-unmenu-mymain.awk* 25-unmenu-dupe_files.awk* 50-unmenu-user_scripts.cgi* syslog_match.conf* 10-unmenu-links.awk* 29-unmenu-sysinfo.awk* 99-unmenu-utility.awk* unmenu.awk* 10-unmenu_user_script_hello* 30-unmenu-file_browser.awk* 990-unmenu-wget.awk* unmenu.base.lib.awk* 1000-unmenu_user_script_restart* 30-unmenu_user_script_getra* 999-unmenu-unraid_main.awk* unmenu.conf* 16-unmenu-syslog.awk* 30-unmenu_user_script_setra-0256* MoveCopy.htm* utility.lib.awk* 17-unmenu-syslog.awk* 30-unmenu_user_script_setra-1024* drivedb.lib.awk* uu* 20-unmenu-usage.awk* 30-unmenu_user_script_setra-2048* myMain.conf* 20-unmenu_user_script_goodbye* 40-unmenu_user_script_disk_speed* myMain_local.conf* Link to comment
Joe L. Posted January 22, 2009 Author Share Posted January 22, 2009 The error you got "can't open....." is because the port is already open by the currently running unmenu process. Only one process can open the port at a time. You must kill the old unmenu process first before starting the new one. killall -g awk should do it. Then try starting unmenu on the command line. You should be able to see any error messages when they occur. To quit unmenu started this way, type "Control-C" Joe L. Link to comment
musicmann Posted January 22, 2009 Share Posted January 22, 2009 Thanks, Joe. Here's the error: Tower login: root Linux 2.6.27.7-unRAID. root@Tower:~# cd /boot/unmenu root@Tower:/boot/unmenu# killall -g awk root@Tower:/boot/unmenu# awk -W re-interval -f unmenu.awk gawk: ./990-unmenu-wget.awk:41: warning: escape sequence `\.' treated as plain `.' gawk: ./990-unmenu-wget.awk:395: fatal: expression for `|' redirection has null string value ^C root@Tower:/boot/unmenu# Also, after starting/killing unmenu this way, I'm unable to go to the normal unraid page (http://tower/) Link to comment
Joe L. Posted January 22, 2009 Author Share Posted January 22, 2009 Thanks, Joe. Here's the error: Tower login: root Linux 2.6.27.7-unRAID. root@Tower:~# cd /boot/unmenu root@Tower:/boot/unmenu# killall -g awk root@Tower:/boot/unmenu# awk -W re-interval -f unmenu.awk gawk: ./990-unmenu-wget.awk:41: warning: escape sequence `\.' treated as plain `.' gawk: ./990-unmenu-wget.awk:395: fatal: expression for `|' redirection has null string value ^C root@Tower:/boot/unmenu# Also, after starting/killing unmenu this way, I'm unable to go to the normal unraid page (http://tower/) Interesting... If you type ps -ef | grep emhttp and do not see a line showing something like this, you can start it up again. root 1380 1 0 Jan18 ? 00:00:04 /usr/local/sbin/emhttp (Your process ID and date/time will differ, but you should see /usr/local/bin/emhttp) To start it up again (if not currently in the process list), type: nohup /usr/local/sbin/emhttp & In any case, your error is occurring when one of the package.conf files you have put in place does not have a proper PACKAGE_VERSION_TEST line within it. The current code was not coded to deal with that and it results in incorrect syntax and a fatal error in the plug-in. To fix the plug-in to be able to deal with the missing PACKAGE_VERSION_TEST, you can edit the plug-in as follows: At around line 85 (assuming your file is similar to mine) is the following block of code: # expect the package name first in a series of lines. match( line , /^(PACKAGE_NAME)([\t =]+)(.+)/, c) if ( c[1,"length"] > 0 && c[2,"length"] > 0 && c[3,"length"] > 0 ) { package_count++; package_name[package_count] = substr(line,c[3,"start"],c[3,"length"]) package_descr[package_count] = "" package_url[package_count] = "" package_file[package_count] = "" package_installed[package_count] = "" package_version_test[package_count] = "" package_version_string[package_count] = "" package_depend[package_count] = "" package_dependency_count[package_count] = 0 package_install_count[package_count] = 0 package_installation[package_count] = "" package_mem[package_count] = "" } Change the one line in red above, as shown in blue below, adding the words echo undefined in the set of quotes at the end of the line. # expect the package name first in a series of lines. match( line , /^(PACKAGE_NAME)([\t =]+)(.+)/, c) if ( c[1,"length"] > 0 && c[2,"length"] > 0 && c[3,"length"] > 0 ) { package_count++; package_name[package_count] = substr(line,c[3,"start"],c[3,"length"]) package_descr[package_count] = "" package_url[package_count] = "" package_file[package_count] = "" package_installed[package_count] = "" package_version_test[package_count] = "echo undefined" package_version_string[package_count] = "" package_depend[package_count] = "" package_dependency_count[package_count] = 0 package_install_count[package_count] = 0 package_installation[package_count] = "" package_mem[package_count] = "" } With this change, you will see "current version undefined" in the package manager for the .conf file with the missing line. Joe L. Link to comment
musicmann Posted January 22, 2009 Share Posted January 22, 2009 Thanks, Joe! I'm back on the right track. I should have known it had something to do with what I had done...quickly trying to learn how to make (compliant) package config files. Link to comment
Joe L. Posted January 22, 2009 Author Share Posted January 22, 2009 Thanks, Joe! I'm back on the right track. I should have known it had something to do with what I had done...quickly trying to learn how to make (compliant) package config files. No problem. I'm incorporating the fix in my official version of the package manager. No sense having it crash when somebody is trying to contribute their time to create a new package for everyone to benefit. Joe L. Link to comment
dhy8386 Posted January 23, 2009 Share Posted January 23, 2009 Not sure what happened but all of a sudden, i am unable to use Package Manager to download new packages. I had used it fine to install a bunch of packages. I then recently added the PHP package and tried to download it but when i click Download from inside the package manager, the web browser pops up with a: e </body></html> o It now does this on all packages, even the ones that come "preinstalled" with unMenu. URL bar says for each package (this is the zip one for example): http://tower:8080/package_manager?download-infozip-5.52-i486-2.tgz=Download+infozip-5.52-i486-2.tgz OR for PHP for example: http://tower:8080/package_manager?download-php-5.2.8-i486-1.tgz=Download+php-5.2.8-i486-1.tgz Any ideas on why this might be happening? Link to comment
Joe L. Posted January 23, 2009 Author Share Posted January 23, 2009 Not sure what happened but all of a sudden, i am unable to use Package Manager to download new packages. I had used it fine to install a bunch of packages. I then recently added the PHP package and tried to download it but when i click Download from inside the package manager, the web browser pops up with a: e </body></html> o It now does this on all packages, even the ones that come "preinstalled" with unMenu. URL bar says for each package (this is the zip one for example): http://tower:8080/package_manager?download-infozip-5.52-i486-2.tgz=Download+infozip-5.52-i486-2.tgz OR for PHP for example: http://tower:8080/package_manager?download-php-5.2.8-i486-1.tgz=Download+php-5.2.8-i486-1.tgz Any ideas on why this might be happening? Either you no longer have a nameserver defined, (or it is, but not valid) and the plug-in cannot communicate with the server to get the .tgz file, OR you have a package.conf file that is malformed and incomplete. You can apply a tiny fix if the latter. See this post: http://lime-technology.com/forum/index.php?topic=2595.msg26737#msg26737 From the telnet prompt you can check for the former with ping -c 5 google.com If the ping is successful you have connectivity and the nameserver is fine. Joe L. Link to comment
dhy8386 Posted January 24, 2009 Share Posted January 24, 2009 Joe Doesnt look like the ping is working. Get an unknown host error. Possible that my nameserver is all messed up. I was messing around with my go file and network.cfg file to make performance improvements. BUt thats pretty straight forward stuff so i dont think that necessarily was it.I guess I should try reinstalling some basic unraid files to see if that solves the problem. Let me know what else you think i could try. much thanks EDIT: Ok so it was the network.cfg file. Not sure why. I set dhcp to no, the ip address to the ip i want the unraid server to maintain, and the gateway to my router. Why would this cause a problem? Link to comment
SuperW2 Posted January 27, 2009 Share Posted January 27, 2009 This might be a simple question that I missed the answer too, but how do I add this to my startup files so I don't have to manually kick off on ever unRAID reboot? Link to comment
prostuff1 Posted January 27, 2009 Share Posted January 27, 2009 put a line in your go file that looks like this: # Start up unmenu /boot/unmenu/uu Also, if you have not adopted the Third Party boot structure outlined here then i suggest that you do. We, as a forum, are trying to get people to move towards that structure and it will help move everything forward. Link to comment
JarDo Posted January 28, 2009 Share Posted January 28, 2009 Hey Joe, I'm trying to create a conf file to install the latest slackware version of rsync. I think I have everything correct. The md5sum is correct. The file downloads correctly. It shows in unmenu correctly that the expected installed version is not the same as the version the the conf file is configured to install. But... after downloading the file pressing the button to install doesn't work. I really wanted my next post to be a contribution of a new conf file, but instead my next post is a cry for help. . See attached for my unmenu rsync conf file. Link to comment
Joe L. Posted January 28, 2009 Author Share Posted January 28, 2009 Hey Joe, I'm trying to create a conf file to install the latest slackware version of rsync. I think I have everything correct. The md5sum is correct. The file downloads correctly. It shows in unmenu correctly that the expected installed version is not the same as the version the the conf file is configured to install. But... after downloading the file pressing the button to install doesn't work. I really wanted my next post to be a contribution of a new conf file, but instead my next post is a cry for help. . See attached for my unmenu rsync conf file. It is hard to be humble here... In file 990-unmenu-wget.awk at line 310 you will find the following: [pre] } else { # installed, but different version theHTML = theHTML "<td><font color=\"orange\">Installed, but version is different.<br>" theHTML = theHTML "Current version='" ver_string "' expected '" package_version_string[ i ] "'</font></td>" theHTML = theHTML "<td><input type=submit name=\"install-" package_file[ i ] "\" value=\"Install " package_file[ i ] "\"</td>" } [/pre] Change "install-" to "manual_install-" as shown below and it will work MUCH better. [pre] } else { # installed, but different version theHTML = theHTML "<td><font color=\"orange\">Installed, but version is different.<br>" theHTML = theHTML "Current version='" ver_string "' expected '" package_version_string[ i ] "'</font></td>" theHTML = theHTML "<td><input type=submit name=\"manual_install-" package_file[ i ] "\" value=\"Install " package_file[ i ] "\"</td>" } [/pre] It was my error, not yours. The only time that branch of the code was used was if the version downloaded differed from one that exists already in unRAID. You just happened to be the first to find this bug in my code. However, after fixing the bug, I found the installpkg command failed... because the .tgz file was not valid. Looking within it, it says: The requested URL /pub/slackware/slackware-current/slackware/n/rsync-3.0.4-i486-1.tgz was not found on this server. Your download URL in the .conf file is incorrect, and, once you correctly download the .tgz with a good URL, the md5 will also need to be updated to match. Joe L. Link to comment
SuperW2 Posted January 28, 2009 Share Posted January 28, 2009 put a line in your go file that looks like this: # Start up unmenu /boot/unmenu/uu Also, if you have not adopted the Third Party boot structure outlined here then i suggest that you do. We, as a forum, are trying to get people to move towards that structure and it will help move everything forward. I'm guessing I have something wrong here... Here is my unmenu folder when I launch "uu" manually... root@Media:/boot/boot/unmenu# uu and here is the my "go" file. #!/bin/bash # Start the Management Utility /usr/local/sbin/emhttp & sleep 30 for i in /dev/md* do blockdev --setra 2048 $i done # Start up unmenu /boot/unmenu/uu Link to comment
JarDo Posted January 28, 2009 Share Posted January 28, 2009 Your download URL in the .conf file is incorrect, and, once you correctly download the .tgz with a good URL, the md5 will also need to be updated to match. Joe L. That is so strange because after I press the download button this is what I see: At this point all looks good, I'm just not able to install (the install button does nothing.) Link to comment
JarDo Posted January 28, 2009 Share Posted January 28, 2009 OK, Joe... Trusting you more than I trust what I did myself, I chose another download location for the rsync package and also updated the md5sum in the conf file. After making the change you suggested to 990-unmenu-wget.awk, and after updating my conf file, all seems to be working as advertised now. Could you please check it for me. I want to make sure you agree with my work before other people download the conf for their own use. See attached. I really wish I owned the knowledge that you guys have about what is going on in the PACKAGE_VERSION_TEST line. I constructed this by reverse engineering examples from other conf files. I guess this is how we learn, but I can't wait until the day I can write this stuff without having to look at examples!!! Link to comment
Recommended Posts