• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. TreyBentley
    3. Topics
    • Profile
    • Following 0
    • Followers 0
    • Topics 7
    • Posts 35
    • Best 1
    • Controversial 0
    • Groups 0

    Topics created by TreyBentley

    • TreyBentleyT

      Post Registration Questions and Functions

      FOG Problems
      • • • TreyBentley
      5
      0
      Votes
      5
      Posts
      1.1k
      Views

      Tom ElliottT

      I may think of a mechanism to do a “post-registrationscripts” setup that works similarly to post-download script. However, part of the registration system does not require storage information which is really what’s needed to do this properly.

      Your mechanism of updating an init for yourself would work, but it does make keeping up with changes in the init’s a little more difficult, though I don’t imagine much of the changes affecting the way your init would work.

      I have a script that allows me to customize init’s on the fly in the case my build system is just taking too long.

      #!/bin/bash # Check for webroot if [ -n "$1" -a -e "$1" ]; then webroot="$1"; elif [ -e "/srv/http/fog" ]; then webroot="/srv/http/fog"; elif [ -e "/var/www/html/fog" ]; then webroot="/var/www/html/fog"; elif [ -e "/var/www/fog" ]; then webroot="/var/www/fog"; fi if [ ! -e "$webroot/service" ]; then echo "No service directory to work from" exit 1 fi if [ ! -e "$webroot/service/ipxe" ]; then echo "No ipxe directory to work from" exit 1 fi ipxeroot="$webroot/service/ipxe" currDirectory=`pwd` init64='' init32='' if [ ! -f "$ipxeroot/init.xz" -a ! -f "$ipxeroot/init" ]; then echo "No 64 bit init to process" init64='no' fi if [ ! -f "$ipxeroot/init_32.xz" -a ! -f "$ipxeroot/init_32" ]; then echo "No 32 bit init to process" init32='no' fi if [ -n "$init64" -a -n "$init32" ]; then echo "No init files to process" exit 1 fi if [ ! -e "$ipxeroot/tmp" ]; then mkdir $ipxeroot/tmp >/dev/null 2>&1 fi copyTrunkFiles() { svn up /root/trunk/ >/dev/null 2>&1 cp -r /root/trunk/src/buildroot/package/fog/scripts/bin/* $ipxeroot/tmp/bin/ >/dev/null 2>&1 cp -r /root/trunk/src/buildroot/package/fog/scripts/usr/* $ipxeroot/tmp/usr/ >/dev/null 2>&1 cp -r /root/trunk/src/buildroot/package/fog/scripts/etc/* $ipxeroot/tmp/etc/ >/dev/null 2>&1 cp -r /root/trunk/src/buildroot/system/skeleton/etc/* $ipxeroot/tmp/etc/ >/dev/null 2>&1 errorStat $? } mountTmpFolder() { mount -o loop $ipxeroot/$1 $ipxeroot/tmp >/dev/null 2>&1 if [ -z "$2" ]; then errorStat $? elif [ "$?" != "0" -a -f "$ipxeroot/$1" ]; then unmountTmpFolder "true" mountTmpFolder "$1" fi } unmountTmpFolder() { umount $ipxeroot/tmp >/dev/null 2>&1 if [ -z "$1" ]; then errorStat $? fi } initFSCheck() { fsck.ext2 -a $ipxeroot/$1 >/dev/null 2>&1 errorStat $? } recompressInit() { xz -9 -C crc32 >/dev/null 2>&1 < $ipxeroot/$1 > $ipxeroot/${1}.xz errorStat $? } decompressInit() { xz -d >/dev/null 2>&1 < $ipxeroot/${1}.xz > $ipxeroot/$1 errorStat $? } errorStat() { if [ "$1" != "0" ]; then echo "Failed" exit 1 fi echo "OK" } if [ -z "$init64" ]; then if [ -f "$ipxeroot/init.xz" -a ! -f "$ipxeroot/init" ]; then echo -n " * Decompressing 64 bit init..." decompressInit "init" else echo " * 64 bit init already extracted" fi echo -n " * Mounting 64 bit init..." mountTmpFolder "init" "yes" echo -n " * Copying trunk files..." copyTrunkFiles echo -n " * Unmounting init..." unmountTmpFolder echo -n " * Checking ext2 filesystem..." initFSCheck "init" echo -n " * Recompressing 64 bit Init..." recompressInit "init" fi if [ -z "$init_32" ]; then if [ -f "$ipxeroot/init_32.xz" -a ! -f "$ipxeroot/init_32" ]; then echo -n " * Decompressing 32 bit init..." decompressInit "init_32" else echo " * 32 bit init already extracted" fi echo -n " * Mounting 32 bit init..." mountTmpFolder "init_32" "yes" echo -n " * Copying trunk files..." copyTrunkFiles echo -n " * Unmounting init..." unmountTmpFolder echo -n " * Checking ext2 filesystem..." initFSCheck "init_32" echo -n " * Recompressing 32 bit Init..." recompressInit "init_32" fi

      I realize this is probably not customized for your needs, but it should do what you need in a pinch. Of course you’re more than welcome to editing it.

    • TreyBentleyT

      Advanced Menu Issue(s)

      FOG Problems
      • • • TreyBentley
      22
      0
      Votes
      22
      Posts
      7.2k
      Views

      JunkhackerJ

      @TreyBentley if you have any trouble with resolving fog kernel panics, just start a new thread and we’ll help you out.

    • TreyBentleyT

      LDAP in http.conf?

      Linux Problems
      • • • TreyBentley
      9
      0
      Votes
      9
      Posts
      2.8k
      Views

      Tom ElliottT

      @TreyBentley Ultimately, it will break MUCH more than just ldap. It will break pretty much ALL of fog.

    • TreyBentleyT

      Solved Install SSH in init.gz?

      FOG Problems
      • • • TreyBentley
      11
      0
      Votes
      11
      Posts
      3.2k
      Views

      Tom ElliottT

      @Junkhacker Technically yes.

    • TreyBentleyT

      Upload Log?

      General
      • • • TreyBentley
      1
      0
      Votes
      1
      Posts
      494
      Views

      No one has replied

    • TreyBentleyT

      Change Default Answers to Registration Questions?

      General
      • • • TreyBentley
      8
      0
      Votes
      8
      Posts
      2.3k
      Views

      TreyBentleyT

      Rock on, Tom! Thank you so much for your help!

    • TreyBentleyT

      SubProcess -> mirror: Fatal error: max-retries exceeded

      FOG Problems
      • • • TreyBentley
      14
      0
      Votes
      14
      Posts
      10.6k
      Views

      Tom ElliottT

      Glad I could be of assistance!

    • 1 / 1