Doubts solved; proposing *tested* enhancements for init script

Forum Forums antiX-development Development Doubts solved; proposing *tested* enhancements for init script

  • This topic has 36 replies, 3 voices, and was last updated Jan 14-2:05 am by ctcx.
Viewing 7 posts - 31 through 37 (of 37 total)
  • Author
    Posts
  • #96298
    Forum Admin
    dolphin_oracle

      at this time those of use that maintain the live-initrd have chosen not to incorporate the home_extra changes. all the other changes and adjustments were incorporated.

      we are currently in the middle of update the live-initrd for other reasons (luks2).

      I think it might be wise for you to get into git and gitlab. its hard to follow where to put code snippets when they are in forum posts.

      • This reply was modified 1 year, 3 months ago by dolphin_oracle.
      #96303
      Member
      ctcx

        Thanks for the attention.

        By chance, did you have a bit of chance to at least test the last home_xtra change? Unfortunately I have not had full opportunity to extensively test it, I must admit, but some initial tests seemed to indicate that now these changes work with both directory and tgz -even if both existing-, and no longer conflict with home persistence.

        I’ll give Gitlab a thought.

        What about this other issue, BTW?
        https://www.antixforum.com/forums/topic/what-happened-to-the-miraheze-wiki-site/

        #96337
        Member
        iznit

          ctcx, I thank you for taking the time to contribute these improvements.

          happy holidays

          #97074
          Member
          ctcx

            Mm… I think dolphin may have already marked me due precisely to the past testing errors I had…
            Seriously, why do I have this strong sense

            #97094
            Forum Admin
            dolphin_oracle

              I haven’t “marked” you. I’m here often, but not everyday.

              #97385
              Member
              ctcx

                Last attempt of change suggesting.
                I tried creating Gitlab account, but seemingly their system was a bit “down” -got no response and couldn’t complete form-; sorry for this.

                /live/init:

                copy_xtra() {
                    # Note for devs; please check: local var "dir" is not even used !!! Actually neither "bdir" here...
                    local dir bdir=$1 xtra_dir=$1/xtra tarball=$1/xtra.tgz home_exist
                    
                    [ -d "$NEW_ROOT/home" ] && home_exist=true
                    if [ -e $tarball ]; then
                        msg 'Unpack xtra tarball'
                        gunzip -c "$tarball" | tar x -C $NEW_ROOT/
                        
                        # To avoid conflict when live-init script creates home directory.
                        # Would be cooler if Busybox's tar supported the --transform option,
                        # in which case the below line would be not necessary
                        [ -d "$NEW_ROOT/home" -a ! "$home_exist" ] && mv "$NEW_ROOT/home" "$NEW_ROOT/home.xtra"
                    fi
                    local live_xtra='/live/xtra'
                    if  [ -d "$live_xtra" -a ! -d "$xtra_dir" ]; then
                        msg 'Copy xtra file(s) from %s' "$(fq "$live_xtra")"
                        # Copy into the antiX/xtra dir if we can,
                        # otherwise copy directly to the aufs from the initrd
                        if remasterable; then
                            mkdir -p "$xtra_dir"
                            (cd "$live_xtra" && tar cf - *) | tar x -C "$xtra_dir"
                        else
                            xtra_dir="$live_xtra"
                        fi
                    fi
                    [ -d "$xtra_dir" ] || return
                    local list=$(ls $xtra_dir)
                    [ -n "$list" ] || return
                    if [ -e $tarball ]; then
                        msg 'Found both xtra tarball and xtra directory; taking priority on xtra directory'
                        [ -d "$NEW_ROOT/home.xtra" ] && rm -r "$NEW_ROOT/home.xtra"
                    fi
                    msg 'Copy xtra file(s) to: %s' "$(fq $list)"
                    # Use tar because cp stumbles on some symlinks in target directory
                    (cd "$xtra_dir" && tar cf - *) | tar x -C "$NEW_ROOT"
                    [ -d "$NEW_ROOT/home" -a ! "$home_exist" ] && mv "$NEW_ROOT/home" "$NEW_ROOT/home.xtra"
                    # Create a symlink to the /antiX/xtra directory if it exists
                    local r_dir="$NEW_ROOT/root"
                    local x_dir="$DEFAULT_DIR/xtra"
                    test -e $r_dir/xtra && return
                    test -d $r_dir && test -d $x_dir && log_cmd ln -s $x_dir $r_dir/xtra
                }
                #97386
                Member
                ctcx

                  And the /live/etc/init.d/live-init change mentioned back here:
                  https://www.antixforum.com/forums/topic/doubts-solved-proposing-tested-enhancements-for-init-script/#post-95690

                  Even with your recent changes, your forums no longer admit many normal postings; system even banned me for almost an hour, not allowing logging in with no error.

                  And reiterating yet again:
                  Not related to init script, but one past suggestion of mine for “battery indicator”:
                  https://www.antixforum.com/forums/topic/issue-with-notify-send/#post-81623
                  At least for me, as basic as useful. No similar thing present neither in Base nor Full ISO versions.

                  This time fully tested with root and home persistence types.
                  Let’s see if mr dolphin, along with devs, are in better mood and stop marking me as “fool”.

                  Happy damn Friday 13th.

                Viewing 7 posts - 31 through 37 (of 37 total)
                • You must be logged in to reply to this topic.