Mirrorlist Updating by way of cronie

Goal
I have a pfSense router with a squid cache. This caches archlinux packages. I have already wrote some (noobish/poor/mediocre) scripts on my home server to download all the packages I have. So when the script runs, it downloads the packages to the /tmp dir, in the process updating any contents of the router's cache. However, I have many arch systems in this network, and sometimes their mirrorlists differ, so we must keep those consistent.
Therefor, the end goal of this post is to update the mirrorlist periodically based on a set of criteria. The criteria is basically that it pulls a new mirrorlist from https://www.archlinux.org/mirrorlist/?c … _status=on . This is preferably in a script, placed in /etc/cron.hourly to be ran by the cronie daemon.
What I have
On the server I have a script with the executable bit as follows:
/etc/cron.hourly/archlinux_packages
#!/bin/sh
rm -R /tmp/pacman
list=$(</srv/data/isos/linux/archlinux/scripts/archlinux_packages)
mkdir -p /tmp/pacman/{i686,x86_64}/{cachedir,dbpath}
wget "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/pacman.conf.i686?h=packages/pacman" -O "/tmp/pacman/i686.conf"
wget "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/pacman.conf.x86_64?h=packages/pacman" -O "/tmp/pacman/x86_64.conf"
pacman -Syw --noconfirm --config="/tmp/pacman/i686.conf" --cachedir="/tmp/pacman/i686/cachedir" --dbpath="/tmp/pacman/i686/dbpath" --arch=i686 $list
pacman -Syw --noconfirm --config="/tmp/pacman/x86_64.conf" --cachedir="/tmp/pacman/x86_64/cachedir" --dbpath='/tmp/pacman/x86_64/dbpath' --arch=x86_64 $list
rm -R /tmp/pacman
The archlinux_packages file in line two is a plain text, space separated file of all packages to be downloaded. Following is an excerpt:
base base-devel audacity geany gparted k3b
On the server and every client machine I have a script with the executable bit as follows:
/etc/cron.hourly/mirrorlist_update
#!/bin/sh
wget "https://www.archlinux.org/mirrorlist/?country=CA&protocol=http&ip_version=4&use_mirror_status=on" -O /etc/pacman.d/mirrorlist
sed -i 's/^#Server/Server/g' "/etc/pacman.d/mirrorlist"
Simple stuff. I stole line three from someone. I wish I could give credit.
Yes, I have enabled/started the cronie daemon/service on all systems.
Problem
Scripts don't appear to be running. I have added logging to the mirrorlist_update script (>> /tmp/mirrorlist_update) and the file is not created.
Scripts do run as root, right?
Here is some possibly interesting output:
# run-parts --test /etc/cron.hourly
/etc/cron.hourly/0anacron
/etc/cron.hourly/archlinux_packages
/etc/cron.hourly/mirrorlist_update
Also, the contents of all the /etc/pacman.d/mirrorlist files should have today's date (2014-09-19) in them, but instead they have 2014-09-18. This is from yesterday when I had tested them manually.
I'm kinda stuck at this point. I can't prove it, but at one point during testing yesterday I was SSH'd into my server, and the time stamps on the /etc/pacman.d/mirrorlist file were accurate, and I could see the file structure in /tmp being made and populated. Is it a Schrodinger problem where I need to keep an eye on it for it to run?
Any help is greatly appreciated. User error is great.
I probably didn't RTFM enough like usual, right?

I'd suggest you do not use the squid cache. Simply run pacserve on all arch machines to share packages, let your home server download the packages regularily while it runs pacserve constantly. Or maybe even build a full local mirror and use that on all machines.
http://xyne.archlinux.ca/projects/pacserve/
Last edited by progandy (2014-09-19 22:58:44)

Similar Messages

  • My 80 gig ipod color stops updating half way through

    My ipod 80 gig color stops updating half way through the synch process. I have tried to restore it and it still fails and gives me an error message saying it cannot read or wrtie to the ipod after it is half way loaded after trying to load 5000+ songs only it gets to about 2,250 and stops.

    It could be an indication or a damaged or dying hard drive.  I would recommend doing a disk diagnostic on the iPod's HD using the instructions given by turingtest2 in this older thread.  He also covers what the resulting numbers indicate.
    https://discussions.apple.com/thread/3784647?start=0&tstart=0
    If necessary, post the resultings numbers and we can verify what the next steps to take.
    B-rock

  • My grandad has a 1st edition iPad and when he tries to download certain apps it says he needs at least iOS 5? Shouldn't this be updated automatically? Or can this be updated another way? I haven't been to see his iPad so he may not be looking properly???

    My grandad has a 1st edition iPad and when he tries to download certain apps it says he needs at least iOS 5? Shouldn't this be updated automatically? Or can this be updated another way? I haven't been to see his iPad so he may not be looking properly??? Any helpers???

    The iOS version is not updated automatically, though if he connects it to his computer's iTunes (if it's a recent enough version) he should be prompted as to whether he wants to update.
    He should connect the iPad to his computer's iTunes and copy any purchases off the iPad to his computer via File > Transfer Purchases. He may also want to copy photos and any important documents off the iPad as well e.g. via the file sharing section at the bottom of the device's apps tab when connected to iTunes, via wifi, email, dropbox etc - they should be included in the backup, but it's best to have a copy of them outside of the backup just in case. He can then force a backup of the iPad by right-clicking the iPad 'Device' on the left-hand side of iTunes and selecting 'Backup'.
    He can then start the update by selecting the iPad on the left-hand side of iTunes, and on the Summary tab on the right-hand side clicking the Check For Updates button
    Updating to iOS 5+ : http://support.apple.com/kb/HT4972
    His iPad should update to iOS 5.1.1 (which is the only version that is 'signed' by Apple for the iPad 1, it doesn't support iOS 6).

  • HT201263 my iphone 4 has this same issue, did these steps but when it was doing the software update, half way through my phone still wouldn't move pass the apple logo. help!

    my iphone 4 has this same issue, did these steps but when it was doing the software update, half way through my phone still wouldn't move pass the apple logo. help!

    Please see the two articles below:
    http://support.apple.com/kb/TS3694
    http://support.apple.com/kb/TS3125

  • BlackBerry Z10/Q10 - contacts stop synching or updating (both ways from device and MS Outlook)

    Hi folks,
    Hopefully somebody can shed some light on this issue we are starting to see more and more at work.
    Are users are connected to the BDS10 server.   When they activate the device they are using the Work Account option.
    The issues are everything works excepts Contacts.   When they initially activate the device the contacts may or may not come over to device.   May or may not work accordingly with the updates from outlook and the device.   Then out of nowhere the synching and updating may stop.
    I have tried everything i can think of with the user:
    moved contacts into a sub-folder
    exported contacts to .csv and then re-import to possibly eliminate a bad entry
    delete and recreate the workspace
    delete and readd on the BDS10 and then delete and recreate the workspace
    guided the user to the old BB Article:
    http://btsc.webapps.blackberry.com/btsc/viewdocument.do?noCount=true&externalId=KB10009&sliceId=2&cm...
    Some databases failed to synchronize: Address book
    If the above error occurs, please follow the below checklist
    1)  Ensure that at least one of the following fields for the contact is populated(not blank)
         First Name
         Last Name
         Company Name
    2)  Check that there are no special characters within the BlackBerry smartphone Address Book, IBM Lotus Notes address book, or Microsoft Outlook contact
    Special characters include: () # $ @ ! & % " - , ^ " ; ,
    NOTE: these users have 800 or more contacts, one user has 3093 contacts!
    NOTE: these users stated they NEVER had this problem with THEIR OLD BB DEVICES!
    NOTE: our company is using MS Exchange 2003 ActiveSync in relation to user's mail store.
    Any help would be appreciated!

    Outlook/BB contact syncing seems broken. I have around 50 contacts and it couldn't sync those properly either. i was getting duplicates each time the device was restarted.
    The best way to sync contacts on a Z10/Q10 is to add the contacts directly to your mail box. I added all my contacts to me @live.com address book and my Q10 pulled those contacts just fine.

  • IPhone5 stuck in recovery mode during iOS7.0.6 update - no way to secure media?!

    Hi Apple,
    I have run your recent iOS7.0.6 update on my iPhone5 and it got stuck in the Apple logo + progress bar screen (N.B. I had no problems updating an iPadAir and iPhone4). To get it out of the update infinite loop (no pun intended!) I put it into recovery mode, i.e. pressed Power+Home buttons until I got the blue iTunes + USB cable screen. iTunes wants to restore the phone continuously and I cannot get it out of the recovery mode now to save my media. Do you have any suggestions?
    Many thanks!

    dr4712 wrote:
    That is not very helpful, TJBUSMC1973.
    Is there really no way to get the media off the phone before restoring it?
    No, once the device in is recovery mode, there is really no way to get the media off of the phone.  However, perhaps you have an iCloud backup?  Check www.icloud.com and log in with your Apple ID & password to see fi you have any data there.
    Other than that, you'd have to independently research third-party data recovery processes that may or may not be helpful.  But since those are not approved by Apple, we can't make any recommendations.
    The device has effectively 'crashed'.  That's why you can't get the data.  Other than the third party options I mentioned, all your Apple-authorized options have been explained.

  • App-V package update best way to deploy?

    Hello<o:p></o:p>
    I have updated for an App-V 5 package that is currently targeted to users via
    an application deployment with an WMI AD Group membership query.<o:p></o:p>
    What is best way for current users to receive the updated APP-V package ? Do I simply
    run update content wizard on the application deployment? Or do I need to
    create a new application deployment that supersedes & uninstalls the
    current application deployment?<o:p></o:p>
    Thank you.
    <o:p>Nick</o:p>

    Basically for a version number change add in a supersede rule to supersede the previous version and delete the deployment to the previous release (not an uninstall).
    If just a change to the xml then just update the content to the DP.
    Cheers
    Paul | sccmentor.wordpress.com

  • FF updates happen way, way too often

    Firefox 13 arrived and well, like suspected, plug-ins/add-ons are not compatible. Most important one for me is Kaspersky Anti Banner. So back to FF 12 for me.
    Mozilla states that companies have more then enough time to alter their software: 6 weeks.
    6 weeks? Come on, that is way to short! FF is forcing companies to work constantly on their software just to fit in their ridiculous update scheme of every 6 weeks an incompatible update!?
    FF was the best browser for me but this weird, way to often update thing really brings it down. And I am not alone with this: just do a search on this way too often update cycle and you will find many, many complaints about it.
    I did file it as a bug but all I got back was: "Developers are giving a 6 weeks heads up to make their software compatible. If they can not do this ... well, then it is their own fault."
    Yep, Mozilla is beginning to show Micro$oft behaviour :(

    this is a primarily user driven support forum, so there isn't much that we can do about it. if you want to give feedback to mozilla, use https://input.mozilla.org/feedback
    my personal thoughts on the issue: most addons default to compatible anyway, so developers won't have any additional work to do for a new firefox release. if a commercial company like kaspersky decides that it wants to offer a browser addon one supposes it can't be that hard to keep up with a pre-scheduled release cycle of 6 weeks. they apparently also have the capability to constantly develop & distribute signatures every few hours.
    you can also just use the adblock extension as alternative - it's free, works very well for millions of users & doesn't have any compatibility problems with new versions of firefox: http://adblockplus.org/en/getting_started

  • HT4623 Trying to update my iPad 2, however in general settings there is no prompt to do this like there is on my iPhone. How do I update another way?

    I'm trying to update my ipad2, however in general settings there is not prompt to let me do so. Is this iOS5 update not available for my iPad or is there another way to do this?

    The Settings > General > Software Update option only appears when you have iOS 5+ installed - if you are on iOS 4 then you will need to do the next update via your computer's iTunes.
    Connect the iPad to your computer's iTunes and copy any purchases off the iPad via File > Transfer Purchases (you may also want to copy photos off the iPad as well) and then force a backup of the iPad by right-clicking the iPad 'Device' on the left-hand side of iTunes and selecting 'Backup'. You may also want to copy off the iPad any important documents, notes, files etc e.g. via the file sharing section at the bottom of the device's apps tab when connected to iTunes, via wifi, email, dropbox etc - they should be included in the backup, but it's best to have a copy of them outside of the backup just in case.
    You can then start the update by selecting the iPad on the left-hand side of iTunes, and on the Summary tab on the right-hand side clicking the Check For Updates button.
    Updating to iOS 5+ : http://support.apple.com/kb/HT4972

  • App updated half way, and stopped. Can't delete or continue download.

    I impatiently decided to update several apps on the road today, before I had access to WiFi (at work). App started downloading the update and stopped about half way. I assumed that once I was able to contect to the network, it would speed up and complete without problem. Well, now it's stuck. I can't delete it or access it. It's basically a dead icon on my screen.
    I haven't tried connecting it to my iTunes at home, but is there another way to access installed apps and force delete? iPhone finder?
    Thanks!

    Sometimes it's the simple solutions that slip our minds
    No probs

  • Yet another mirrorlist updater

    Hey hey
    i did some bash scripting for learning purposes and wrote a script that updates the pacman mirrorlist. its an improved version of the script in the wiki: Mirrorlist Generator
    with some extra features:
    a clean config file
    logging
    backup/restore the original list
    simple syntax check for the new and the current list
    maybe someone wants to review or test (backup your mirrorlist!) it? you can find it at GitHub and in the AUR
    say something bad or good or both.
    thx, ushi

    This seems to have stopped the update indicators. Thanks for that. For amusement value, I tried the update function on PS6 itself. It still indicates the same updates are needed, and of course gives our favorite error:
    Adobe CSXS InfrastructureCS6
    Installation failed. Error Code: U44M1P7
    Adobe Bridge CS6 5.0.2 Update
    Installation failed. Error Code: U44M1P7
    Clearly there is a fundamental flaw somewhere in ADOBE's system.
    If Adobe thinks anyone is going to gleefully cough up $600 per year, every year, for the same buggy stuff, you should probably think again.

  • Ipod updates half way then stops

    Hi i have a 20gig click wheel. i am sharing files with a computer in the office in my home. im attempting to update my ipod from my upstairs computer by just having half of my library being feed from the computer in my office ( i have half of my music in my room half in my office). The problem ive been having lately is that i got a new ipod and it wont update the music from downstairs past the letter M it still puts on the music from the upstairs computerafter m but not the music downstairs.

    SUCCESS
    I uninstalled every program published by Apple. Opened Internet Explorer ( I had previously used Firefox ) and downloaded Itunes again.
    Now it works

  • Bricked new Iphone 4 during update, any way to get some life in it?

    Bought two Iphone 4, and was setting them up.
    First part went Ok recognized and Itune suggested firmware update.
    Well update crashed with a error and now the phone just comes up with connect to itunes symbol screen and nothing happens when you plug it in it does not show up in itunes under devices any more.
    Itunes works and ports because if I connect the other new phone you get a msg about it in itunes, so the total dead thing is rather certain the phone.
    Spent some time searching to see if I could find some button reset other than the 10 sec power + circle one but no luck.
    So is there any software, key-press that can un-brick the phone or is it back to store that is the solution?
    Does not feel as a good idea to try with the other phone unless this first is solved, at least it functions as a "test tool" to see that itunes and port is working

    First,
    Thanks for answering!
    Played around some more and can now get iTunes to reqgonize the phone and it then say it have to be restored:
    Well I now have an error: 1604 and googled a bit and also had a look around so this is the content of a logfile:
    +2010-12-26 02:49:07.468 [3212:c90]: restore library built Oct 15 2010 at 22:47:15+
    +2010-12-26 02:49:07.468 [3212:c90]: iTunes: iTunes 10.1.1.4+
    +2010-12-26 02:49:07.468 [3212:c90]: iTunes: Software payload version: 8C148+
    +2010-12-26 02:49:59.312 [3212:9b4]: iTunes: Specifying UOI boot image+
    +2010-12-26 02:49:59.312 [3212:9b4]: * UUID 9B42F948-5394-FB46-8D9D-4B1BB6E00BE2 *+
    +2010-12-26 02:49:59.312 [3212:9b4]: requested restore behavior: Erase+
    +2010-12-26 02:49:59.312 [3212:9b4]: amai: AMAuthInstallBundlePersonalizePartial: build manifest specifies baseband skeyid: <CFData 096A0088 [01AC5078]>{length = 20, capacity = 20, bytes = 0x97ab34ac0693f5b03bfb726d4e2c254f14e270a1}+
    +2010-12-26 02:49:59.343 [3212:9b4]: amai: AMAuthInstallPlatformCreateDataFromFileURL: can't resolve file+
    +2010-12-26 02:49:59.359 [3212:9b4]: amai: AMAuthInstallDebugWriteObject: debug object written: c:\windows\TEMP\PerF.tmp\amai\debug\tss-request.plist+
    +2010-12-26 02:50:00.375 [3212:9b4]: amai: tsssubmitjob: HttpQueryInfo returned 200+
    +2010-12-26 02:50:01.000 [3212:9b4]: amai: AMAuthInstallRequestSendSync: received tss response (server version: 0.6.31-b11)+
    +2010-12-26 02:50:01.062 [3212:9b4]: amai: AMAuthInstallDebugWriteObject: debug object written: c:\windows\TEMP\PerF.tmp\amai\debug\tss-response.plist+
    +2010-12-26 02:50:02.312 [3212:a34]: iBoot build-version = iBoot-931.18.27+
    +2010-12-26 02:50:02.312 [3212:a34]: iBoot build-style = RELEASE+
    +2010-12-26 02:50:02.312 [3212:a34]: AMDeviceIoControl: GetOverlappedResult failed+
    +2010-12-26 02:50:02.312 [3212:a34]: AMDeviceIoControl: pipe stall+
    +2010-12-26 02:50:02.312 [3212:a34]: USBControlTransfer: error 31, usbd status c0000004+
    +2010-12-26 02:50:02.312 [3212:a34]: command device request for 'getenv radio-error' failed: 2008+
    +2010-12-26 02:50:02.312 [3212:a34]: radio-error not set+
    +2010-12-26 02:50:02.312 [3212:a34]: unable to open device_map.txt: No such file or directory+
    +2010-12-26 02:50:02.312 [3212:a34]: <Recovery Mode Device 092B0938>: production fused device+
    +2010-12-26 02:50:02.312 [3212:a34]: interface has 1 endpoints, file pipe = 1+
    +2010-12-26 02:50:02.312 [3212:a34]: <Recovery Mode Device 092B0938>: operation 4 progress -1+
    +2010-12-26 02:50:02.359 [3212:a34]: bootstrapping restore with iBEC+
    +2010-12-26 02:50:02.375 [3212:a34]: <Recovery Mode Device 092B0938>: operation 31 progress -1+
    +2010-12-26 02:50:03.375 [3212:a34]: <Recovery Mode Device 092B0938>: Recovery mode succeeded+
    +2010-12-26 02:55:03.515 [3212:c90]: iTunes: Restore error 1604+
    It looks like there where no backup done, because if you move out what is in "iPhone Software Updates" single file exactly the same gets downloaded name: "iPhone3,14.2.1_8C148Restore.ipsw"
    Which looks like the current new release and not the previous version v4.1 or something like that.
    Worth mentioning is that I never entered the phone menus making any changes but took it out of the box mounted sim and went from there "obeying" the iTunes suggestion to update.

  • TS3694 I keep getting error 3194 whenever trying to update. any way that i can fix this?

    iv been trying forever. iv done everything the internet says and i just dont know how to do it anymore. this is my last resort.

    iPhone Error 3194 - How to Fix iTunes Error 3194?
    Fix Error 3194 from iTunes during iPhone restore
    Errors 3000-3999 (3004, 3013, 3014, 3018, 3164, 3194, and so on): Error codes in the 3000 range generally mean that iTunes cannot contact the update server (gs.apple.com) on ports 80 or 443.
    Update to the latest version of iTunes.
    Verify the computer's date and time are accurate.
    Check that your security or firewall software is not interfering with ports 80 or 443, or with the server gs.apple.com.
    Follow Troubleshooting security software. Often, uninstalling third-party security software will resolve these errors.
    An entry in your hosts file may be redirecting requests to gs.apple.com (see "Unable to contact the iOS software update server gs.apple.com" above).
    Internet proxy settings can cause this issue. If you are using a proxy, try without using one.
    Test restoring while connected to a known-good network.
    Try on another computer.
    - Make an appointment at the Genius Bar of an Apple store.
    Apple Retail Store - Genius Bar

  • HT6162 I am unable to update my iPad 4 to IOS 7.1 the application is updating half way and stopping

    Am unable to update my iPad to IOS 7.1 .

    Make sure your iPad is located close to your wifi router so you have an excellect wifi/internet connection.
    Are you getting an error message?
    iPad: Unable to update or restore
    http://support.apple.com/kb/ht4097
    iTunes: Specific update-and-restore error messages and advanced troubleshooting
    http://support.apple.com/kb/TS3694
    If you can’t update or restore your iOS device
    http://support.apple.com/kb/ht1808
     Cheers, Tom

Maybe you are looking for