How to pass parameters for Debian installer (.deb)











up vote
2
down vote

favorite












I am developing a specialized Unix application that has the Debian installer (.deb). It needs to get few simple string values during installation. These values must be picked by the post-install bash script.



What would be most reasonable, approved way top pass these values to the post install script?










share|improve this question


























    up vote
    2
    down vote

    favorite












    I am developing a specialized Unix application that has the Debian installer (.deb). It needs to get few simple string values during installation. These values must be picked by the post-install bash script.



    What would be most reasonable, approved way top pass these values to the post install script?










    share|improve this question
























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      I am developing a specialized Unix application that has the Debian installer (.deb). It needs to get few simple string values during installation. These values must be picked by the post-install bash script.



      What would be most reasonable, approved way top pass these values to the post install script?










      share|improve this question













      I am developing a specialized Unix application that has the Debian installer (.deb). It needs to get few simple string values during installation. These values must be picked by the post-install bash script.



      What would be most reasonable, approved way top pass these values to the post install script?







      software-installation debian-installer






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 2 hours ago









      h22

      361110




      361110






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote













          The “approved” way to do this is to use debconf. This might seem surprising if you’re not interested in actually prompting the user for the information; but beyond prompting, debconf is based on the notion of package configuration variables, and prompting is only one of the ways that can be used to provide the values for those variables. The debconf-devel manpage describes how to use this.



          In your case, you’d declare the variables in your package’s templates and config script, and then use them in your postinst. To feed the values in without prompting, you’d then use pre-seeding:





          • write a file containing the keys and values:



            <package> <config key> <config type> <value>
            ...



          • before installing the package, store its configuration:



            debconf-set-selections < preseed-file



          See Automating the installation of individual debian 8 packages with interactive prompts for an example.






          share|improve this answer





















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "106"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














             

            draft saved


            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f482092%2fhow-to-pass-parameters-for-debian-installer-deb%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            2
            down vote













            The “approved” way to do this is to use debconf. This might seem surprising if you’re not interested in actually prompting the user for the information; but beyond prompting, debconf is based on the notion of package configuration variables, and prompting is only one of the ways that can be used to provide the values for those variables. The debconf-devel manpage describes how to use this.



            In your case, you’d declare the variables in your package’s templates and config script, and then use them in your postinst. To feed the values in without prompting, you’d then use pre-seeding:





            • write a file containing the keys and values:



              <package> <config key> <config type> <value>
              ...



            • before installing the package, store its configuration:



              debconf-set-selections < preseed-file



            See Automating the installation of individual debian 8 packages with interactive prompts for an example.






            share|improve this answer

























              up vote
              2
              down vote













              The “approved” way to do this is to use debconf. This might seem surprising if you’re not interested in actually prompting the user for the information; but beyond prompting, debconf is based on the notion of package configuration variables, and prompting is only one of the ways that can be used to provide the values for those variables. The debconf-devel manpage describes how to use this.



              In your case, you’d declare the variables in your package’s templates and config script, and then use them in your postinst. To feed the values in without prompting, you’d then use pre-seeding:





              • write a file containing the keys and values:



                <package> <config key> <config type> <value>
                ...



              • before installing the package, store its configuration:



                debconf-set-selections < preseed-file



              See Automating the installation of individual debian 8 packages with interactive prompts for an example.






              share|improve this answer























                up vote
                2
                down vote










                up vote
                2
                down vote









                The “approved” way to do this is to use debconf. This might seem surprising if you’re not interested in actually prompting the user for the information; but beyond prompting, debconf is based on the notion of package configuration variables, and prompting is only one of the ways that can be used to provide the values for those variables. The debconf-devel manpage describes how to use this.



                In your case, you’d declare the variables in your package’s templates and config script, and then use them in your postinst. To feed the values in without prompting, you’d then use pre-seeding:





                • write a file containing the keys and values:



                  <package> <config key> <config type> <value>
                  ...



                • before installing the package, store its configuration:



                  debconf-set-selections < preseed-file



                See Automating the installation of individual debian 8 packages with interactive prompts for an example.






                share|improve this answer












                The “approved” way to do this is to use debconf. This might seem surprising if you’re not interested in actually prompting the user for the information; but beyond prompting, debconf is based on the notion of package configuration variables, and prompting is only one of the ways that can be used to provide the values for those variables. The debconf-devel manpage describes how to use this.



                In your case, you’d declare the variables in your package’s templates and config script, and then use them in your postinst. To feed the values in without prompting, you’d then use pre-seeding:





                • write a file containing the keys and values:



                  <package> <config key> <config type> <value>
                  ...



                • before installing the package, store its configuration:



                  debconf-set-selections < preseed-file



                See Automating the installation of individual debian 8 packages with interactive prompts for an example.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 2 hours ago









                Stephen Kitt

                156k23343416




                156k23343416






























                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f482092%2fhow-to-pass-parameters-for-debian-installer-deb%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Accessing regular linux commands in Huawei's Dopra Linux

                    Can't connect RFCOMM socket: Host is down

                    Kernel panic - not syncing: Fatal Exception in Interrupt