November 13, 20187 yr Hi All,  Early Happy Holidays to everyone! 🎅  So, I decided to revisit Wake-On-Lan (WOL) for my SuperMicro X10DAC board which is my primary unRAID server (#1 of 4). All my others have IPMI and work well. As #1 was my first unRAID build, and subsequently the beefiest, it serves most of data and media needs to our family.  However, there are periods of time (sometimes days) where it is simply unnecessary for the system to be up, so I would like it to sleep. Sleep process was/is accomplished (thank you @bonienl for the great Sleep plugin), and after a little digging at SlackWare.org, and a tweak to the eth0 profile related to WOL, I am now able to wake #1 with a Magic Packet.  However, the "tweak" to the eth0 profile does not survive reboots. So, my question is: where is the best place to put options/custom scripts/settings/commands to survive the reboot process?  Currently, I specifically need to add " ethtool -s eth0 wol g " somewhere so it survives reboot. But, as my knowledge of unRAID grows and I experiment more with custom scripts etc, I would also like to know where to add them too, so they survive reboot.  Thanks much! Edited November 13, 20187 yr by TechMed Question answered with a solution!
November 13, 20187 yr There are two locations within the Unraid Linux file system that survive a reboot: the boot flash device that's mounted at /boot and the array and cache disks that appear under /mnt. The rest is in RAM and is lost when you reboot. For your particular need there's a file called /boot/config/go (i.e. config/go on the boot flash device). Simply add the line ethtool -s eth0 wol g to it and it will be run every time your reboot.
November 13, 20187 yr Community Expert 46 minutes ago, John_M said: There are two locations within the Unraid Linux file system that survive a reboot: the boot flash device that's mounted at /boot and the array and cache disks that appear under /mnt. The rest is in RAM and is lost when you reboot. For your particular need there's a file called /boot/config/go (i.e. config/go on the boot flash device). Simply add the line ethtool -s eth0 wol g to it and it will be run every time your reboot. @TechMed, if you do this, be sure that you use a Linux aware editor! I use EditPad Lite. I believe that NotePad++ is another Linux aware editor. Â
November 13, 20187 yr You can use the built-in nano editor from the Unraid command prompt - it's very Linux aware Â
November 13, 20187 yr Author Thank you @John_M and @Frank1940! Â I appreciate the quick and succinct replies. Â I have been plodding along with vi and while it works, it is a bit clunking for this nube. Â I think I will look at some of the other editors; thanks for the nano suggestion. Â Have a great day!
November 13, 20187 yr Author Apologies, my reply got truncated somehow... I meant to say thanks for the EditPad Lite, NotePad++, and nano suggestions! Â Thanks again!
November 14, 20187 yr 23 hours ago, Frank1940 said: Linux aware editor! Although its good practice to be in, the go file though is allowed DOS endings (Notepad will work no problems)
November 14, 20187 yr Community Expert 6 minutes ago, Squid said: Although its good practice to be in, the go file though is allowed DOS endings (Notepad will work no problems) Both of my go files have Linux line endings in them and that was what I based my recommendation on. What I can't figure out is which files can allow either Linux and/or DOS line endings. As a result, I always use a Linux aware editor. (Although, I suspect that the smb-extra.conf is one since it is not one of the standard Unraid config files...)Â
November 14, 20187 yr Yeah, @limetech's not super consistent on line endings on the flash drive files LMAO  go - DOS endings All the share's .cfg files - DOS endings All the .cfg files in /config - DOS endings except for domain.cfg and docker.cfg - Linux endings Any .conf file - Linux endings Any .cfg file in /config/plugins/*/* - Linux endings  In a perfect world, everything on the flash drive would be DOS endings to make things easier for the end user. But its no doubt such a low priority that no one cares to get them consistent (including myself  )  Edited November 14, 20187 yr by Squid
November 14, 20187 yr In the perfect world none of the *.cfg files should be edited directly by the user. These are all auto-generated files. Â
November 14, 20187 yr 23 minutes ago, bonienl said: In the perfect world none of the *.cfg files should be edited directly by the user. These are all auto-generated files.  Until the world gets perfect, config file editor fills the gap nicely   New tag line for the CA branded plugins: "Making the world perfect" Edited November 14, 20187 yr by Squid
November 14, 20187 yr Community Expert Problem is that in the DOS (MS) world, line endings are LF/CR,             in the MAC world, line endings are CR             in the Linux/UNIX world, they are LF.  I think we have folks using as PC's with all three of these environments. Who is to say what a perfect world. I think that anyone using Unraid ought to be using an editor that recognizes which of the three the file is using and adjust its behavior to follow that file's settings when a new line of text is entered into the file.  PS: For those who are confused, LF= line feed (ascii code 10), CR= carriage return (ascii code 13). Back in the old days, a carriage return as defined as simply returning the print head back to the beginning of the line (allowed printing of the line twice). A line feed advanced the page up for a blank line to print on. (A line feed left the print head in its present location.) I can remember printers having settings (toggle switches if memory serves) to be able to accommodate these three conditions so that final printout was what the user wanted.Â
November 14, 20187 yr 1 hour ago, bonienl said: In the perfect world none of the *.cfg files should be edited directly by the user. These are all auto-generated files. That's definitely how things have evolved.  Originally, in Unraid v1.0 days, as a last step before ejecting the flash from your windows PC, the instructions had users optionally use Notepad to edit some of the files on the flash, for example, config/ident.cfg to set the server name and config/network.cfg to set the server IP address. Thus these files needed windows-style line endings.
Archived
This topic is now archived and is closed to further replies.