There is a "-s" argument to the "rootfs-image" image you are using to inject state scripts,
$ mender-artifact write rootfs-image --help
NAME:
   mender-artifact write rootfs-image - Writes Mender artifact containing rootfs image
USAGE:
   mender-artifact write rootfs-image [command options] <image path>
OPTIONS:
   --update FILE, -u FILE           Update FILE.
   --device-type value, -t value    Type of device(s) supported by the update. You can specify multiple compatible devices providing this parameter multiple times.
   --artifact-name value, -n value  Name of the artifact
   --output-path value, -o value    Full path to output artifact file.
   --version value, -v value        Version of the artifact. (default: 2)
   --key value, -k value            Full path to the private key that will be used to sign the artifact.
   --script value, -s value         Full path to the state script(s). You can specify multiple scripts providing this parameter multiple times.